COIT 20245 Assessment item 2 JAVA Program using array of objects
Assessment details COIT 20245
Assessment item 2—JAVA Program using array of objects
Objectives
This assessment item relates to the unit learning outcomes as stated in the Unit Profile.
Details
For this assignment, you are required to develop a Menu Driven Console Java Program to demonstrate you can use Java constructs including input/output via the console, Java primitive and built-in types, Java defined objects, arrays, selection and looping statements and various other Java commands. Your program must produce the correct results.
The code for the menu and option selection is supplied: YeppoonCaravanParkMenu.java and is available on the unit website, you must write the underlying code to implement the program. The menu selections are linked to appropriate methods in the given code. Please spend a bit of time looking at the given code to familiarise yourself with it and where you have to complete the code. You will need to write comments in the supplied code as well as your own additions.
What to submit for this assignment
It is a requirement that you use Netbeans for your final submission.
Submit a zip of your Netbeans project folder.
o Ass2.zip
If you are only using textPad submit a zip of your source code.
A report including an UML class diagram of your Booking class, how long it took to create the whole program, any problems encountered, and screenshots of the output produced including annotations. (Use Alt-PrtScrn to capture just the application window and you can paste it into your Word document) You should test every possibility in the program.
o ReportAss2.docx
You will submit your files by the due date using the “Assignment 2” link on the Moodle unit website under Assessment … Assignment 2 Submission.
COIT20245, 2021 Term One - Page 2 of 12
Assignment Specification
You have completed the console program for processing bookings for Yeppoon Caravan Park. We are going to extend this application so the booking names and number of nights and guests per booking can be stored in an array of objects, do not use ArrayList.
The program will run via a menu of options, the file YeppoonCaravanParkMenu.java has been supplied (via the Moodle web site) which supplies the basic functionality of the menu system.
Look at the code supplied and trace the execution and you will see the menu is linked to blank methods (stubs) which you will implement the various choices in the menu.
Booking class
First step is to create a class called Booking (Booking.java).
The Booking class will be very simple it will contain three private instance variables:
o bookingName as a String
o nights as an integer
o guests as an integer
The numeric literal values maximum booking, number of nights for the different discount levels and booking costs must be represented as constants.
The following public methods will have to be implemented:
o A default constructor
o A parameterised constructor
o Three set methods (mutators)
o Three get methods (accessors)
o A method to calculate and return the charge for the booking – calculateCharge(). This calculation will be the same as in assignment one. Use constants for all numeric literals.
Up to five nights stay will be the standard price of $14.50 per night and $4.95 per guest.
The next five nights (up to ten) will be $12.50 per night and $3.95 per guest.
All nights stayed over ten nights will be $10.50 per night and $2.95 per guest.
Completed Assignment Preview:
Comments
Post a Comment