Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) Door is an abstract class. SlidingGlassDoor extends Door. HingedDoor extends Door. AutomaticDoor extends Door. Which of the following lines of code contains an error?

1)

Door is an abstract class. SlidingGlassDoor extends Door. HingedDoor extends Door. AutomaticDoor extends Door. Which of the following lines of code contains an error?

Question 1 options:

Door door = new Door();

Door[] doors = {new SlidingGlassDoor(), new HingedDoor()};

AutomaticDoor door = new AutomaticDoor();

Door door = new SlidingGlassDoor();

2)

public int absoluteValue(int x){ ... } public double absoluteValue(double x){ ... } public float absoluteValue(float x){ ... } The above methods represent an example of

Question 2 options:

overloading

inheritance

synonyms

overriding

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

More Books

Students also viewed these Databases questions