Modify the method that sets the number of guests

Assignment Help Basic Computer Science
Reference no: EM131547741

Question: Case Problem #1 Carly's Catering provides meals for parties and special events. In Chapters 3 and 4, you created an Event class for the company. Now, make the following changes to the class:

- Currently, the class contains a field that holds the price for an Event. Now add another field that holds the price per guest, and add a public method to return its value.

- Currently, the class contains a constant for the price per guest. Replace that field with two fields-a lower price per guest that is $32, and a higher price per guest that is $35.

- Add a new method named isLargeEvent() that returns true if the number of guests is 50 or greater and otherwise returns false.

- Modify the method that sets the number of guests so that a large Event (over 50 guests) uses the lower price per guest to set the new pricePerGuest field and calculate the total Event price. A small Event uses the higher price.

- Save the file as Event.java

Reference no: EM131547741

Questions Cloud

Explains why americans vote for politicians and judges : State your hypothesis that explains why Americans vote for politicians and judges that make laws and decisions that have these results?
Aspects of healthcare educational experience : 1. What aspects of your healthcare educational experience have you found most helpful in preparing you for leadership in organizations?
Develop a strategy for human resource professionals : Develop a strategy for human resource professionals and IT professionals to work together. Does the paper address the question(s) or task(s)?
Dividend policy-calculate dividend payout and dividend yield : Calculate the dividend payout and dividend yield. Identify a dividend payout policy that the company follows.
Modify the method that sets the number of guests : Case Problem #1 Carly's Catering provides meals for parties and special events. In Chapters 3 and 4, you created an Event class for the company.
Reliable estimating procedure : "If these percentages are consistent over the past few years, then this is a reliable estimating procedure."
When does tripitaka pray and what for : When does Tripitaka pray and what for? What kinds of supernatural interventions do we see in this story?
What is the risk-neutral probability of positive outcome : A company is currently awaiting the outcome of a major lawsuit. What is the risk-neutral probability of a positive outcome?
Write recursive and string-valued method that accepts string : Write a recursive, string-valued method, replace, that accepts a string and returns a new string consisting of the original string with each blank replaced.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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