Cash-back offer from May 7th to 12th, 2024: Get a flat 10% cash-back credited to your account for a minimum transaction of $50.Post Your Questions Today!

Question DetailsNormal
$ 24.00

Unit 5 Chapter 14 Assignment | Solution

Question posted by
Online Tutor Profile
request

Unit 5 Chapter 14 Assignment
Grading Information: This Program is due on Date Specified.
Comments are REQUIRED; flow charts and pseudocode are NOT REQUIRED.
Directions Points
The files must be called <LiFiUnit5Ch14.java> (driver program)
LiFiPizza.java
LiFiMeat.java (which extends LiFiPizza)
LiFiCheese.java (which extends LiFiPizza)
The files must be called as specified above, (LiFi = Your Last Initial Your First Initial)
Proper coding conventions required the first letter of the class start with a capital
letter and the first letter of each additional word start with a capital letter.
Only submit the .java files needed to make the program run. Do not submit the
.class files or any other files.
5%
Style Components
Include properly formatted prologue, comments, indenting, and other style elements
as shown in Chapter 2 starting page 64 and Appendix 5 page 881-892.
5%
Topics covered in chapter
Topics with * are covered in this assignment. Ensure you use every item listed below in your
completed assignment.
Object class
equals method
*toString method
*Inheritance
*Polymorphism
*Abstract
Interfaces
Protected access modifier
Basic Requirements
Write a super basic Pizza ordering system using Polymorphism.
LiFiUnit5Ch14 (driver)
• Get input for Cheese or Meat pizza.
18%
• Declare a single pizza of LiFiPizza type to be used for both Cheese and Meat
• If a Meat pizza is selected
o instantiate your pizza as a LiFiMeat pizza with zero arguments
o call setCrust() of LiFiMeat
o call setIngredient of LiFiMeat
• If a Cheese pizza is selected,
o Instantiate your pizza as a LiFiCheese pizza with zero arguments.
• Print your order by printing the pizza object (should call the corresponding
toString() method implicitly)
LiFiPizza.java
• abstract class
• private instance data members: type (String), crust(String), and cost (double)
• Default constructor: set cost to initial value $5
• Accessor (getXXX) and mutator (setXXX) methods for each instance data
member
26%
LiFiCheese.java (extends LiFiPizza)
• Default constructor: call appropriate mutator methods of parent class to set
type to “Cheese” and set crust to “Thin”
• Override toString() to return a String representing the state of the Cheese
pizza object. See the sample for the format of the data
16%
LiFiMeat.java (extends LiFiPizza)
• private instance data member: ingredient (String)
• Default constructor: call appropriate mutator method of parent class to set type
to “Meat”
• setCrust(): this method is an overloaded version of the setCrust(String) of
parent class. Allow selection of Thin or Thick crust and call setCrust(String) of
parent class to set instance data member crust (see Sample)
• setIngredient():
o prompt for and input one ingredient (can be any ingredient, but just
one. see Sample)
o add $2 to the initial cost
• Override toString() to return a String representing the state of the calling Meat
pizza object. See the sample for the format of the data
30%
NOTE: Complete your activity and submit it by clicking “Submit Assignment”
Total Percentage 100%
Sample
Your output will vary based on Input.

Available Answer
$ 24.00

[Solved] Unit 5 Chapter 14 Assignment | Solution

  • This Solution has been Purchased 1 time
  • Submitted On 10 Jul, 2016 05:34:47
Answer posted by
Online Tutor Profile
solution
public abstract class LiFiPizza { public...
Buy now to view the complete solution
Other Similar Questions
User Profile
Assig...

Sophia college algebra unit 5 challenge 4!Rated A+ Answers

Your answers are attached. Thanks for purchasing this assignment!...
User Profile
Quali...

PSYCHOLOGY UNIT 5 CHALLENGE 3 MEMORY, COMPLETE WITH QUESTIONS AND ANSWERS.

PSYCHOLOGY UNIT 5 CHALLENGE 3 MEMORY, COMPLETE WITH QUESTIONS AND ANSWERS.Gaining access to information or events from the past occurs during which of the following stages of memory?  a.) The encoding stage  b.) Th...
User Profile
maste...

FIN305 Unit 5 Chapter 7 Quiz Latest 2018 (A+++ Answer)

Question Question 1 1 out of 1 points Under the Employee Retirement Income Security Act, a company can be liable for its pension plan up to 30% of its net worth 30% of pension liabilites 30% of liabilities 40% of its net wor...
User Profile
vpqnr...

Unit 5 Chapter 14 Assignment complete solutions correct answers key

Unit 5 Chapter 14 Assignment complete solutions correct answers key Unit 5 Chapter 14 Assignment Grading Information: This Program is due on Date Specified. Comments are REQUIRED; flow charts and pseudocode are NOT REQUIRED....
User Profile
AceTu...

Unit 5 Chapter 14 Assignment | Solution

Public abstract class LiFiPizza { public LiFiPizza() { this.cost = 5; } public String getType() { return type; } public void setType(String ...

The benefits of buying study notes from CourseMerits

homeworkhelptime
Assurance Of Timely Delivery
We value your patience, and to ensure you always receive your homework help within the promised time, our dedicated team of tutors begins their work as soon as the request arrives.
tutoring
Best Price In The Market
All the services that are available on our page cost only a nominal amount of money. In fact, the prices are lower than the industry standards. You can always expect value for money from us.
tutorsupport
Uninterrupted 24/7 Support
Our customer support wing remains online 24x7 to provide you seamless assistance. Also, when you post a query or a request here, you can expect an immediate response from our side.
closebutton

$ 629.35