Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

These questions are java 1. Class Reply inherits from class Post. Write the header for class Reply (one line only). 2. Class Rectangle inherits from

These questions are java

1. Class Reply inherits from class Post. Write the header for class Reply (one line only).

2. Class Rectangle inherits from class Shape and interfaces Colors and Constants. Write the header for class Rectangle (one line only).

3. Here is interface I. public interface I {

public abstract void foo( ); }

Class C inherits from interface I. Code class C with a minimal implementation so that it is not abstract and it compiles (In other words, you do not require content inside curly braces.)

4. I is an interface, A is an abstract class, and B and C are regular classes. C inherits from B (i.e., B is the superclass of C). List all the errors and explain why they are errors.

A a = new A( ); // 1

B b1 = new B( ); // 2

C c1 = new C( ); // 3

I i = new I( ); // 4

B b2 = new C( ); // 5

C c2 = new B( ); // 6

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

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

8. How are they different from you? (specifically)

Answered: 1 week ago