Question: Java i need correct and full code , quick please .. 1- 2- 4- 5- Create a java project and name it FinalExam_Q2: (0.25 for
Java
i need correct and full code , quick please ..
1- 2- 4- 5- Create a java project and name it "FinalExam_Q2": (0.25 for each error in the code) Create an abstract class 'Shapes (1 m) Add three attributes to the Shapes class: Id style and color. (1m) 3- Add two abstract methods to the class. Area' and 'Coordinates (2m) Add non abstract method display that print the id, style and color on one line. (1m) Create a class rectangle with a method Coordinates' which prints "cirice and method "Area which return wh (2m). 6- create a class "triangle" with a method Coordinates' which prints "Triangle" and method Area which return 144 *b*h. (2m) 7- Add "h" and "w" attributes the rectangle class and "w & b' attributes to the triangle class. (0.5m) 8- Overload the constructor in the triangle Class. (1m) 9- Both class inherit form the class Shapes (1m) 10- Override the display method in both classes to print the extra information (m) 11. In the main program Create two objects: one for rectangle and one for Triangle (1m) Call their respective methods (1m) 12- Test your program (0.5m) a b
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
