Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

THE PROJECT SHOULD BE TITLED U1A1_InheritOverridetoString THIS IS THE DATA NEEDED AND A SAMPLE OUTPUT OF WHAT IT SHOULD LOOK LIKE. PLEASE PROVIDE SCREENSHOTS OF

image text in transcribed

image text in transcribed

THE PROJECT SHOULD BE TITLED U1A1_InheritOverridetoString THIS IS THE DATA NEEDED AND A SAMPLE OUTPUT OF WHAT IT SHOULD LOOK LIKE. PLEASE PROVIDE SCREENSHOTS OF THE CODE INSTEAD OF JUST THE TEXT OF THE CODE.

image text in transcribed

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. IThe 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) constructor simply assigns the received values to their corresponding attributes and the course code assigned to the class object 4. Parameterized constructor with the three parameters of code, creditHours, and title. The 5. An overridden toString() method that returns the name of the Java class (i.e. Course) 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 optionalResources attribute - a string field for the optional resources for a flexpath course Parameterized constructor with the three parameters of code, creditHours, and title The constructor simply assigns the received values to their corresponding attributes An overridden toString() method that returns the name of the Java class (i.e. FlexPathCourse) and the course code assigned to the class object 1. 2. 3. The GuidedPathCourse class adds the following members 1. duration attribute - an int field for the duration of a guidedpath course requiredResources attribute - a string field for the required resources for a guidedpath course Parameterized constructor with the three parameters of code, creditHours, and title The constructor simply assigns the received values to their corresponding attributes 2. 3

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

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions