Answered step by step
Verified Expert Solution
Question
1 Approved Answer
java net beans Write a class Shoes with the following attributes: String Type : Casual, Sport, Classic and String: color. Add the Full-argument constructor No-argument
java net beans
- Write a class Shoes with the following attributes: String Type: Casual, Sport, Classic and
String: color.
- Add the Full-argument constructor
- No-argument constructor
- Add getters, setters, toString methods
- displayShoesType() which display the type of shoes.
- displayColor() which display the color.
- isSport() which indicate if the object is sport shoes or Not.
- Write a class FootballShoes which inherent from Shoes and the following attributes
Double price, String Brand, String model (Hard ground or grass ground), String reference.
- Add the Full-argument constructor
- No-argument constructor
- displayBrand() which display the brand of the shoes.
- isExpensive() which indicates if the shoes is expensive (above 1000 sar) or not.
- Override the equals() method to compare two shoes based on their Type and brand. The method should return true if both shoes have the same type and same brand and false otherwise.
- Write demo for the Class FootballShoes name the file Test_FootballShoes.java:
- Create instance: Casual, Black, Adidas, 450 SAR, hard_ground, 23232322424.
- Create instance: Sport, bleu, Puma, 230 SAR, hard_ground, 20203442333
- Create instance: Sport, White, Nike, 524 SAR, grass_ground, your Id as a reference here.
- Test the method: displayBrand for all above objects.
- Test method: isExpensive () for all above objects
- Test Display price for the first object.
- Update the price for the second object to be 340 SAR.
- Test if last two objects are equals.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started