Create a class that holds the service description and price

Assignment Help JAVA Programming
Reference no: EM13974191

Create a class that holds the service description

The following table shows the various services offered by a hair salon, including its prices and times required:

Service Description Price ($) Time (Minutes)

Cut 8.00 15

Shampoo 4.00 10

Manicure 18.00 30

Style 48.00 55

Trim 6.00 5

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 return one of the data field's values. Save the class as Service.

Create a second class called SalonReport which has three attributes:

• A single-dimensional array that can hold five Service objects. Fill the array with the data from the table above.

• Number of employees

• A two dimensional array that will hold the number of each type of service each employee in the salon has conducted.

SalonReport should have the following methods:

• A constructor which takes the number of employees as a parameter

• InsertService(int serviceNo, int employeeNo, int total) - the insert service method will take in the number of times a service was conducted for a particular service and employee. You can assume the numbers passed in for the service and employee are valid indexes for the 2D array.

• calculateServiceTotalByEmployee(int serviceNo, int employeeNo) - returns the total amount earned for a particular employee and particular service. Like the last method, you can assume the numbers passed in are the index of the service and employee.

• calculateServiceTotal(int serviceNo) - returns the total amount earned for a particular service for all employees. (Assume serviceNo is a valid index to the array).

• calculateSalontTotal() - returns the total amount earned for all services for all employees.

Reference no: EM13974191

Questions Cloud

Why do you think sears wants to reinstall commissions : Do you think that the new safeguard that separates diagnosing problems from selling services will prevent a recurrence of past problems? Explain.
The final solution has a density of 1.00 g/ml : You wish to prepare 500.0 mL of a 550.0 ppm w/v fluoride (MW = 18.9984 g/mol) solution. How many grams of beryllium fluoride (BeF2, MW = 47.01 g/mol) are needed to prepare this solution? Assume the final solution has a density of 1.00 g/mL.
Calcium nitrate solution to 5 drops of distilled water : You add 5 drops of 0.20 M Calcium Nitrate solution to 5 drops of distilled water. Calculate the concentration of the diluted solution. I was using V1M1=V2M2 , it keeps saying my answer is wrong
What is the relationship between discounting and compounding : Calculate the amount of money that Sharon needs to set aside from her bonus this year to cover the down payment on a new car, assuming she can earn 6 percent on her savings. What if she could earn 6 percent on her savings?
Create a class that holds the service description and price : 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.
Elements are known for having predictable charge : Which types of Elements are known for having predictable charge?
4 cro5 + 12 h+ : 4 CrO5 + 12 H+ ---->    7   ? (a gas) + 6 H2O + 4 Cr3+
How baca use of symbols and metaphors : In the poem Baca writes eloquently about the perfect nature of the imperfect soul. In a 300 word (minimum) response describe how Baca's use of symbols and metaphors (and other poetic techniques) convey the idea that each of us needs to accept ours..
Summary of pro points of view, and possible cons view : summary writing according to DEBATE POINT: TeamD Midterm Debate.doc, to prove China can rise peacefully (using related references), double space, 5 pages MLA formatting style

Reviews

Write a Review

JAVA Programming Questions & Answers

  Determine when the application should stop looping display

Write an application that reads a series of pairs of numbers as follows: 1) product number 2) quantity sold - Create an application in java

  Java program which, given three sides of a triangle

Produce a Java program which, given three sides of a triangle, determines whether the triangle is:

  The class date was designed and implemented

In Programming Exercise 2, the class Date was designed and implemented to keep track of a date, but it has very limited operations. Redefine the class date so that, it addition to the operations already defined, it can perform the following operation..

  Write a program that collects three strings

Write a program that collects three Strings from the user. Display the three strings in alphabetical order regardless of the order in which they were input.

  Test plan outline a test plan for a substantial real-life

test plan outline a test plan for a substantial real-life system of your choosing. some possible examplesbullbaggage

  How can i maintain a single instance of an object in applet

How can I maintain a single instance of an object in an applet? What is UDP and how does it work?

  Declares three arraylist objects referenced by the objects

Write a program called ThreeArrayLists.java that declares three ArrayList objects referenced by the objects named priceList, quantityList, and amountList

  Design an object hierarchy

Design an object hierarchy and design your own UML class diagram to reflect the classes and relationship required by your program.

  Create your listarray class

Create your ListArray class that is functionally similar to the formal Java ArrayList Utility class. here are the requirements

  Java program to write-read data from user using i-o function

Write java program to write and read data from user using I/O functions. Describe class with data members name[20],emp_id,basic pay,net pay.calculate all the allowances.

  Java catering program console based

For this assignment, you are required to design and develop a console (text-based) application for a small catering business. This application will simulate booking appointments, tracking catering jobs and processing payments.

  Describe how a semaphore can be used to act like a lock.

The loop should execute until a "shutdown" flag is set to true on the runnable object executing in the thread.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd