[Solved] Design and code a simple Java application that defines a class

$25

File Name: Design_and_code_a_simple_Java_application_that_defines_a_class.zip
File Size: 584.04 KB

SKU: [Solved] Design and code a simple Java application that defines a class Category: Tag:
5/5 - (1 vote)

Design and code a simple Java application that defines a class, instantiate the class into a number of objects, and prints out the attributes of these objects in a specific way.

The application is to define a Java class called Course. The Course class has the following attributes:

1. code a string field to store the course code (e.g. IT1006)

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

The application then instantiates, in order, seven instances (objects) from the Course class and assigns to each instance the following values:

Order of instantiation Course Object code attribute Course Object creditHours attribute

1 IT1006 6

2 IT4782 3

3 IT4789 3

4 IT4079 6

5 IT2230 3

6 IT3345 3

7 IT2249 6

Finally, the application prints out, in the same order as the instantiation order, the attributes of these instances using this format: [order of instantiation] Course Code (Course Credit Hours) Successful completion of this assignment will show the correct order of object instantiation and the correct attributes of each object when the application is run. Your program output should look like this sample output:

Course Registration.Course Objects each has a code (ex. AD1005) and credit hours (ex. 3).The number inside [] is the display order number.The number inside () is the credit hours for the course.

[1] AD1005 (6)[2] AD2005 (3)[3] AD3005 (3)[4] AD4005 (6)[5] AD5005 (3)[6] AD6005 (3)[7] AD7005 (6)

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] Design and code a simple Java application that defines a class
$25