Try the fastest way to create flashcards

Related questions with answers

a. Carly’s Catering provides meals for parties and special events. In earlier Chapters 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 (more than 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

b. In earlier Chapter, you modified the EventDemo class to demonstrate two Event objects. Now, modify that class again as follows:

  • Instantiate three Event objects, and prompt the user for values for each object.

  • Change the method that displays Event details to use the new isLargeEvent() method and the new price per guest value. Use the display method with all three objects.

  • Create a method that accepts two Event objects and returns the larger one based on number of guests. (If the Events have the same number of guests, you can return either object.) Call this method three times—once with each pair of instantiated Events—and display the event number and number of guests for each argument as well as the event number and number of guests for the larger Event.

Save the file as


Which two lines have the same y-intercept? Of these two lines, which has the larger slope?


Answered 1 year ago
Answered 1 year ago
Step 1
1 of 2

A linear function has the form:

y=f(x)=b+mx.y = f(x) = b + mx.

Its graph is a line such that:

  • mm is the slope or rate of change of yy with respect to xx.
  • bb is the vertical intercept or value of yy when xx is zero.

Create a free account to view solutions

Create a free account to view solutions

Recommended textbook solutions

Thomas' Calculus 14th Edition by Christopher E Heil, Joel R. Hass, Maurice D. Weir

Thomas' Calculus

14th EditionISBN: 9780134438986 (11 more)Christopher E Heil, Joel R. Hass, Maurice D. Weir
10,142 solutions
Applied Calculus 4th Edition by Flath, Gleason, Hughes-Hallett, Lock

Applied Calculus

4th EditionISBN: 9780470170526Flath, Gleason, Hughes-Hallett, Lock
2,812 solutions
Calculus: Early Transcendentals 8th Edition by James Stewart

Calculus: Early Transcendentals

8th EditionISBN: 9781285741550 (6 more)James Stewart
11,084 solutions
Calculus: Early Transcendentals 9th Edition by Daniel K. Clegg, James Stewart, Saleem Watson

Calculus: Early Transcendentals

9th EditionISBN: 9781337613927 (1 more)Daniel K. Clegg, James Stewart, Saleem Watson
11,050 solutions

More related questions