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
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
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Please Help
Java
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 data, show 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
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps
Knowledge Booster
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.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education