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

  Create a method named justsold that increments the hotdogs

Finally, add a static variable that tracks the total number of hotdogs sold by all hot dog stands and a static method that returns the value in this variable.

  Questions1 write a programme that computes the rental

questions1. write a programme that computes the rental charge given the type of moped when it is rented weekday or

  Image to a "black-to-green scale" image

Call a method that will change the image to a "black-to-green scale" image.

  What fields and methods are inherited by which class

What java keyword is used in a class header when a class is defined as inheriting from an interface?

  Create a scatterplot visualization

Create a Scatterplot visualization that reads data from a comma-separated text file. The visualization code should be written in Java using Processing.

  Code that sorts the household sizes in ascending order

The program should allow the user to enter each household size and determine the mean and median household size in Marengo. Need to write the code that sorts the household sizes in ascending order using a bubble sort.

  Prepare a program that constructs a binary tree

Write your own implementation of primitive operations and use self-referential classes in your implementation.

  Define output operators for clock and travelclock

Define output operators for Clock and TravelClock. Modify the classes Clock and TravelClock to declare the output operators as friends.

  What does the variable x contain

What does the variable x contain at the end of each of these computations? If the code is not legal in Java, say so.

  Program called power that displays the positive powers

Write a program called Power that displays the positive powers of 2. When the user enters the exponent at a prompt, the program displays 2 to that power. The program halts when the user enters -1

  Create a separate class for the selected product

Create a separate class for the selected product that holds the item number, the name of the product, the department in which the product belongs, the number of units in stock, and the price of each unit. You must use the product and class name th..

  Create java application containing array that stores 2 value

Create a JApplet with a JButton labeled "Who's number one?". When the user clicks the button, display your favorite sports team. Save the file as JNumberOne.java.

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