Question
THERE ARE TWO PARTS IN THIS QUESTION A) Table 1 shows the various services offered by a hair salon, including its prices and times required:
THERE ARE TWO PARTS IN THIS QUESTION
A) Table 1 shows the various services offered by a hair salon, including its prices and times required:
Create a class that holds the service description, price, and number of minutes it takes to perform the service.
Include a constructor that requires arguments for all three data fields and three get methods that each returns one of the data fields values.
Save the class as Service.java.
B)
Write an application named SalonReport that contains an array to hold six service objects, and fill it with the data from Table 1.
Include methods to sort the array in ascending order by each of the data fields.
Prompt the user for the preferred sort order, and display the list of services in the requested order.
Save the program as SalonReport.java
Price Service Description Time (Minutes) Cut 15 Shampoo 4.00 10 Maricu 18.00 30 Style 20 55 35 18.00 Permanent 0.0 5 Table 1 Salon services, prices, and times
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started