Question
Help please i need this asap A) Write a class Shoes with the following attributes: String Type: Casual, Sport, Classic and String: color. o Add
Help please i need this asap
A) Write a class Shoes with the following attributes: String Type: Casual, Sport, Classic and String: color. o Add the Full-argument constructor o No-argument constructor o Add getters, setters, toString methods o displayShoesType() which display the type of shoes. o displayColor() which display the color. o isSport() which indicate if the object is sport shoes or Not.
B) 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. o Add the Full-argument constructor o No-argument constructor o displayBrand() which display the brand of the shoes. o isExpensive() which indicates if the shoes is expensive (above 1000 sar) or not. o 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.
C) 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