Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE Explain the approach taken to complete this assignment and the major decisions made. In this assessment, you will design and code a Java console

PLEASE Explain the approach taken to complete this assignment and the major decisions made.

In this assessment, you will design and code a Java console application that defines a class, extends it into two other classes, overrides the toString() for all three classes, instantiates the classes into three objects, invokes the toString() on these objects, and prints out the return value of each toString() invocation. You can use either the Toolwire environment or your local Java development environment to complete this assignment.

The requirements of this application are as follows. The application is to define a Java class called Course. The Course class has the following members:

1. code attribute - a string field to store the course code (e.g. IT4789)

2. creditHours attribute an int field to store the credit hours of the course (e.g. 3)

3. title attribute a string field to store the title of the course (e.g. Mobile Cloud Computing Application Development)

4. Parameterized constructor with the three parameters of code, creditHours, and title. The constructor simply assigns the received values to their corresponding attributes

5. An overridden toString() method that returns the name of the Java class (i.e. Course) and the course code assigned to the class object

The application need to extend the Course class into two other Java classes named:

1. FlexPathCourse

2. GuidedPathCourse

The FlexPathCourse class adds the following members:

1. optionalResources attribute a string field for the optional resources for a flexpath course

2. Parameterized constructor with the three parameters of code, creditHours, and title. The constructor simply assigns the received values to their corresponding attributes

3. An overridden toString() method that returns the name of the Java class (i.e. FlexPathCourse) and the course code assigned to the class object

The GuidedPathCourse class adds the following members:

1. duration attribute an int field for the duration of a guidedpath course

2. requiredResources attribute a string field for the required resources for a guidedpath course

3. Parameterized constructor with the three parameters of code, creditHours, and title. The constructor simply assigns the received values to their corresponding attributes

4. An overridden toString() method that returns the name of the Java class (i.e. GuidedPathCourse) and the course code assigned to the class object

The application will then instantiates three objects from the Course, FlexPathCourse, and GuidedPathCourse and invokes their corresponding toString() methods. Use these attribute values when instantiating the three classes to test your application:

image text in transcribed

Successful completion of this assignment will show the correct class name and course code printed out when the application is run. Your program output should look like this sample output:

image text in transcribed

creditHours Class Name Course FlexPath Course code TBD IT2230 title TBD Introduction to Database Systems Mobile Cloud Computing Application Development GuidedPathCourse ITFP4789 run: Teacher's Copy Java class name = 'Course' Course Code = TBD Java class name = 'GuidedPathCourse' Course Code = IT2230 Java class name = 'FlexPathCourses Course Code = ITFP4789 BUILD SUCCESSFUL (total time: 0 seconds)

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_2

Step: 3

blur-text-image_3

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

Question

e. What are notable achievements of the group?

Answered: 1 week ago