Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 ..

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions