Assignment Task
Task
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: RockyBluesMenu.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 must complete the code. You will need to write comments in the supplied code as well as your own additions.
A-Plus Writing Help For University Students
Get expert assistance in any academic field. All courses and programs covered.
Get Help Now!Assignment Specification
You have completed the assignment one console program for processing bookings for Rocky Blues School. We are going to extend this application so the booking names, number of lessons and guitar purchase can be stored in an array of objects, do not use ArrayList.
The program will run via a menu of options, the file RockyBluesMenu.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:
- bookingName as a String
- lessons as an integer
- purchaseGuitar as boolean
The numeric literal values maximum booking, minimum lessons (i.e. one), the different discount levels and discount values, guitar cost and lesson charge must be represented as constants.
The following public methods will have to be implemented:
- A default constructor
- A parameterised constructor
- Three set methods (mutators)
- Three get methods (accessors)
- 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.
You should use the following method header:
public double calculateCharge()
Note: you do not need to pass lessons or purchaseGuitar as parameters as you can access the instance
variables directly within the class.The Rocky Blues School offers personal blues guitar lessons for people in the Rockhampton region. The lessons are in half hour blocks.
The cost of a lesson is $29.95.
To encourage students to book more lessons, the management has decided to give a ten percent discount for a booking with more than five lessons and a twenty percent discount with a booking of more than ten lessons on the total lesson charge (not for the purchase of a guitar see below).
Rocky Blues also offers the students a chance to purchase a guitar for $199.00.
This is the same as assignment one.
Note: Following basic database principles, calculated values are not usually stored, so in this case we will not store the charge as a instance variable, but use the calculateCharge() method when we want to determine the charge.
Rocky Blues Menu class
Once the Booking class is implemented and fully tested, we can now start to implement the functionality of the menu system.
Data structures
For this assignment we are going to store the booking names and number of lessons and the purchaseGuitar boolean value in an array of Booking objects.
Declare an array of Booking objects as an instance variable of RockyBluesMenu class the array should hold ten bookings.
You will need another instance variable (integer) to keep track of the number of the bookings being entered and use this for the index into the array of Booking objects.
This COIT 20245–IT Computer Science Assignment has been solved by our IT Computer Science Expert at TV Assignment Help. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing Style. Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered.
You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turn tin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
Welcome to our Online Essay Writing Agency. Securing higher grades costing your pocket? Order your assignment online at the lowest price now! Our online essay writers are able to provide high-quality assignment help within your deadline. With our homework writing company, you can order essays, term papers, research papers, capstone projects, movie review, presentation, annotated bibliography, reaction paper, research proposal, discussion, or another assignment without having to worry about its originality – we offer 100% original content written completely from scratch
We write papers within your selected deadline. Just share the instructions
