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

  Describe algorithm that finds maximum feasible flow in graph

Describe an algorithm that finds a maximum feasible flow in G. Denote by MF(|V|, |E|) the worst-case running time of an ordinary maximum flow algorithm.

  Write an algorithm to count nodes in a linked list

storage pool and that there is a special null value. Write an algorithm to count the nodes in a linked list with first node pointed to by first."

  Function to swap all the left-right subtrees of binary tree

Write a function, swapSubTrees, that swaps all of the left and right subtrees of a binary tree. write a method singleParent, that returns the number of nodes in a binary tree that have only one child.

  Find cost of sorting the relation in seconds

Suppose you need to sort a relation of 40 gigabytes, with 4 kilobyte blocks, using a memory size of 40 megabytes. Find the cost of sorting the relation, in seconds, with bb = 1 and with bb = 100.

  Recurrence-worst case running time-recursive binary search

Provide a recurrence for worst case running time of recursive Binary Search function in terms of n, the size of the search array. Solve the recurrence.

  Design a control unit for simple hand held video game

Create a control unit for a simple hand held video game in which a character on the display catches objects. Only demonstrate the transition diagram

  Describe and implement fft algorithm cooley-tukey

Describe and implement in C++ FFT algorithm "Cooley-Tukey". Also, implement naive DFT and compare naive DFT with FFT using: a sample of the signal x(t) = t

  Create efficient algorithm to find path in graph

Given connected undirected graph G described by the adjacency list representation create the efficient algorithm to find the path in G which goes through exactly once in each direction.

  Create a solution algorithm using pseudocode

Algorithm that will receive two integer items from a terminal operator, and display to the screen their sum, difference, product and quotient.

  Converting arithmetic expression in reverse polish notation

Convert the following numerical arithmetic expression into reverse Polish notation and show the stack operations for evaluating the numerical result.

  Design algorithm to receive two integer items from terminal

Design an algorithm that will receive two integer items from a terminal operator, and display to the screen their sum, difference, product and quotient.

  Creating an object oriented data model

Create an object oriented data model, including all appropriate notations, to represent the given situation. In a particular region there are a number of gardens.

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