Create a TeeShirt class for Lebo’s Tee Shirt Company. Attributes include an order number, size, color, and price. Create set methods for the order number, size, and color and get methods for all four attributes. The price is determined by the size: R122.99 for XXL or XXXL, and R109.99 for all other sizes.   Create a subclass named CustomTee that descends from TeeShirt and includes an attribute to hold the slogan requested for the shirt, and include get and set methods this field. The display() method should me an abstract method.   Write a test class named DemoTees.java that creates two objects of each class, and demonstrate that all the methods work correctly by communicating to the user to input the tee shirt size, color, and slogan, then display the tee shirt order number, size, color, slogan and price. Format your output to 2 decimal places. The user should be asked to repeat the process or not, (y) indicates yes they want to repeat the process an the process repeats and (n) indicates no they do not want to repeat the process an the process stops

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 3PE
icon
Related questions
Question

Create a TeeShirt class for Lebo’s Tee Shirt Company. Attributes include an order number, size, color, and price. Create set methods for the order number, size, and color and get methods for all four attributes. The price is determined by the size: R122.99 for XXL or XXXL, and R109.99 for all other sizes.

 

Create a subclass named CustomTee that descends from TeeShirt and includes an attribute to hold the slogan requested for the shirt, and include get and set methods this field. The display() method should me an abstract method.

 

Write a test class named DemoTees.java that creates two objects of each class, and demonstrate that all the methods work correctly by communicating to the user to input the tee shirt size, color, and slogan, then display the tee shirt order number, size, color, slogan and price. Format your output to 2 decimal places. The user should be asked to repeat the process or not, (y) indicates yes they want to repeat the process an the process repeats and (n) indicates no they do not want to repeat the process an the process stops

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,