Java programming language with following concepts: The following are the specifications for the program: First, the program will display main menu consists of: Add Song Rent Song Exit

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter7: User-defined Simple Data Types, Namespaces, And The String Type
Section: Chapter Questions
Problem 7PE
icon
Related questions
Question

Please Help

Java Programming

HospitalPlaylist also wants to rebuild their sales system. You are also tasked to create this program using Java programming language with following concepts:

 

The following are the specifications for the program:

  • First, the program will display main menu consists of:
  • Add Song
  • Rent Song
  • Exit 
  • If the user chooses menu 1 (“Add Song”), the program will prompt the user to input:
    • Song Name. The input must be between 5 and 10 characters.
    • Song Genre. The input must be either “Pop”, “Classic” or “Jazz” (case sensitive).
    • Song Rating. The input must be between 1 and 5
    • Song Type. The input must be either “Band” or “Solo” (case sensitive)
    • After that, the program will generate the Server ID in the following format:
    • If Song Type is “Band” then these is the following format : BDXX (X= random, number from 0 -- 9)
    • If Song Type is “Solo” then these is the following format : SLXX (X= random, number from 0 -- 9)
    • Then the program will insert the song datashow a success message, and return to main menu
  • If the user chooses menu 2 (“Rent Song”):
    • If there is no song data, the program will show “There is no Song!!” message and return to main menu.
    • Otherwise, the program will display all song data that are stored on the list.
    • Then, the program will prompt the user to enter the No of the Song that want to be rented. Validate input must be between 1 and list size.
    • Then the program will prompt the user to enter how many day(s) they want to rent the song. Validate input must be greater than 0.
    • After that, the program will, show an invoice including the rent price of the corresponding server, and return to main menu.
    • The selling price of Band is calculated based on the following formula : Rent Price = InitialPrice * SongRating + 200
    • The selling price of Solo is calculated based on the following formula: Rent Price = InitialPrice * SongRating + 100
    •    Song Type Initial Price
      Band 25
      Solo 10
    • If the user Rent Day(s) is greater than 3 then the user will get extra bonus.
    • Extra Bonus of Band is calculated based on the following formula: Price Discount = Random Number (1-5)*5
    • Extra Bonus of Solo is calculated based on the following formula: Extra Day = Random Number (1-3)
    • Then count them all together with the extra bonus.
  • If the user chooses menu 4 (“Exit”), the program will exit.
Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Block Comments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,