Page 1 of 1

in java DJMusicBusinessclass, a DJMusicBusiness object runs the system. the class has aStudent, aDJ and aTransaction (on

Posted: Mon Jun 06, 2022 1:17 pm
by answerhappygod
in java
DJMusicBusinessclass, a DJMusicBusiness object runs the system.
the class has aStudent, aDJ and aTransaction (only use these
instance variables)
Option 1 (of Figure 1): invoke studentOptions() to present the
Student Menu. This menu allows a user to:
i) Add a new Student.
ii) View all Students.
iii) Search for an existing Student (by name).
iv) Delete a specific Student (remember to check if this Student
has hired a DJ).
v) Return to the Main Menu.
Option 2 (of Figure 1): invoke djOptions() to present the DJ
Menu. This menu allows a user to:
i) Add a new DJ to the System
ii) View all hired DJs
iii) View all available DJs
iv) Search for a specific DJ (by name)
v) Return to the Main Menu
Option 3 (of Figure 1) : invoke transactionOptions() to present
the Transaction Menu. Allows a user to:
i) Hire a DJ
ii) View all transactions
iii) Return to the Main Menu
i) To hire a DJ – public void hireDJ() { }
Prompt the user for the name of the Student who wants to hire.
Search for that Student to ensure there is such a Student in the
system. If the Student exists, prompt for the name of the DJ s/he
wishes to hire. Check to see whether this DJ exists and is
available for hire, by using: if(isHired == false). Remember to
update the DJ (use the setIsHired(boolean) method ) to reflect that
the DJ has now been hired.
ii) View All Transactions – public void viewAllTransactions() {
}
Display all the transactions (which are not null) to the
screen.
iii) Return to Main Menu - Returns the user back to the main
menu
Option 4 (of Figure 1): Exit - Allows a user to exit the system
(use System.exit(0); )
Stage 1 – Functionality
Your system should begin with data input, i.e., any Student wishing
to hire a DJ has to be added as a customer to the business first,
so your system should add a new Student and a new DJ to the DJ
Music Rental System first. Once these have been successfully
validated and added, your system should allow for searching,
deleting and viewing the details of the Student and DJ. Refer to
the screen dumps shown above, for the respective
functionalities.
Bringing it altogether - your system is required to process 2
different functions (transactions):
i) Allow the student to hire the DJ for a specific date.
ii) View the transaction.
• You are required to work with only one Student, one Music type,
one DJ and one Transaction.
• All validation must be in place.
• Your system must view the details of a Student, a DJ and a
Transaction.
• The Transaction must allow a Student to hire a DJ on a specified
Date and be viewed.
• If a Transaction has not been processed, and the user chooses to
view it, a sensible message should be displayed (example: “No
transaction has been undertaken”).
• You are required to search for the Student and/or the DJ by
name.
• The system must recognise that if no Student has been added, then
you cannot delete the Student. An error message must be displayed
if this is attempted.• Once a DJ has been added to your system, it
cannot be deleted. For this assignment, only a Student may be
deleted, and only if s/he has not hired a DJ.
• No Date objects, Music objects or Transactions may be deleted
from your system, only Students.
• The Date class should validate leap-years, days-in-a-month, year
not < 2021.
• All menus must run continuously. These must be explicit as to the
functionality of your system. Refer to the given screen dumps
above. You may only exit your system from 1 place : the Exit
option