Answered step by step
Verified Expert Solution
Question
1 Approved Answer
AL. (5 marks) Fill in the blanks Use the most suitable words given in the box superchss private ymorphism child chss Information hding encapsulation extends
AL. (5 marks) Fill in the blanks Use the most suitable words given in the box superchss private ymorphism child chss Information hding encapsulation extends Tinal super masking a. The keywords that creates inheritance is b. whaa ?dclass method has he same name and argument types as a superclass method, he subclass method can override the superclass method. This concept is known as C. When you instantiate an object that is a member of a subclass, the constructor is cxecutes first d. A subelass cannot override static methods and e. In Java, the concept of keeping data private is known as A2.(20 marks) methods defined in a supercla a Daw a U/MI. class diagram named Rectangleshape to represent a rectangle. The class contains Two doubke data fields namod width and height hat specify the width and height of the rectangle A no-arg constructor that creates a default rectangle A constructor that creates a rectangle with the specified width and height A method namod getAreaO that retums the area of this rectangle A method named getPerineter O that returns the perimeter (7 marks) besod on the anr in part (a, implement the class (13 marks)
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