Creating a class for services

Assignment Help Data Structure & Algorithms
Reference no: EM1380173

Service Price($) Time(Minutes)

Cut 8.00 15
Shampoo 4.00 10
Manicure 18.00 30
Style 48.00 55
Permanent 18.00 35
Trim 6.00 5

Make a class for services offered by a hair styling salon. Information fields include a String to hold the service description (for example, "Cut", Shampoo", or "Manicure"), a double to hold the price, and an integer to hold the average number of minutes it takes to perform the service. The class name is 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.
Write an application named SalonReport that contains an array to hold six Service Objects and fill it with data from the Table above. Include methods to sort the array in ascending order by price of service, time it takes to perform the service, and in alphabetical order by service description.
Prompt the user for the preferred sorting method, and offer three choices: sort by description, price, or time. Depending on the user's input, display the results.
Save the files as Service.java and SalonReport.java

 

Reference no: EM1380173

Questions Cloud

Creating an automated checkout program : A local department store employee you to create an automated checkout program to expedite customers in a hurry. The checkout line can only allow 5-products for any one purchase.
Java program to make choice for a coffee cup size : Create an application that prompts the user to make a choice for a Coffee cup size, S for Small, T for Tall, G for Grande and V for Venti the rates of cup sizes will be stored in a parallel double array as $2, $2.50, $3.25, and $4.50 respectively.
Preparing a java program : Prepare a program that asks the user how many automobiles are to be explained, and for each automobile it inputs the user's selection of make and color.
Creating villian : Announce a new Villian called sharpay who has a wit of 24, a stealth of sixteen, and who has currently claimed three victims: Chad, Troy, and Gabriella.
Creating a class for services : Make a class for services offered by a hair styling salon. Information fields with a String to hold the service description, a double to hold the price, and an integer to hold average number of minutes it takes to perform the service.
Design and implement a sorting algorithm : Your task is to design and implement a sorting algorithm and running time grows as a linear function of the array
Important java questions : Add a method addText to the Question class, and provide a different implementation of Choice Question that calls add Text rather than storing an array list of selections.
Benefits of dynamic over static arrays : Discuss the benefits of dynamic over-static arrays. Under what conditions will you choose dynamic arrays?
Creating class diagram : Think about a computer system used to manage loans for a library. Libraries loan books, CDs, videos and magazines to registered members.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Show result of inserting keys using linear probing

Show the result of inserting these keys using linear probing, using quadratic probing with c1 = 1 and c2 = 3, and using double hashing with h2(k) = 1 + (k mod (m ¡ 1)).

  Write algorithm which divides n objects of u into k clusters

Suggest the algorithm which divides n objects of U into k clusters, making use of MST of a graph. Give a simple argument of correctness and bound on the running time of the algorithm you are proposing.

  Determining ciphertext generated by encryption

Determine ciphertext (in binary form) generated by encryption of character X?

  Design algorithm to read a file of employee records

Design an algorithm and souce code C++ that will read a file of employee records and produce a weekly report of gross earnings for those employees.

  Determining entropy of encrypted message

If this message is encrypted with DES by using a random 56-bit key, determine encrypted message's entropy?

  What are entity-relationship diagrams

What are entity-relationship diagrams, and how are they used? Discuss the ethical issues to consider when planning a database.

  Creating a table of xml documents

Make a table of XML documents with a type of XML. Use a primary key so add a field of type INT that is an identity. Insert many records into XML field in this new table.

  Find terminal nodes in tree nil if pointer is represented

The node's right child. If the nil pointer is represented by 00 and the tree's root pointer contains 53, how many terminal nodes are in tree?

  Designing an algorithm for task-array of person numbers

You have been allotted task of designing an algorithm for following task. Someone has built the array of person numbers of all n students enrolled in 331 this fall.

  Create algorithm to prepare daily hotel charge report

Create the algorithm to prepare the daily hotel charge report. Input consists of series of records which contain a room number, customer name, cost of the room, and cost of meals charged to the room.

  Explain types of information systems

Question 1. Explain five types of information systems, and give an example of each. Question 2. Describe three common reasons for a systems request. Try and find one not listed in the text.

  Calculate best and worst-case speedup for centralized scheme

Suppose that it doesn't take any time to allot work to process, calculate best- and worst-case speedup for centralized scheme for dynamic mapping with two processes.

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