[Solved] ISM3255 ASG06

$25

File Name: ISM3255_ASG06.zip
File Size: 122.46 KB

SKU: [Solved] ISM3255 ASG06 Category: Tag:
5/5 - (1 vote)

In this assignment, you will modify you two classes from ASG04: MainClass and Course

The Course class should have:

  1. Attributes that can be read and written: (Use Shortened get and set)
    • Description (text) // course name
    • Period (integer)
    • Credits (integer)
    • MaxEnrollment (integer) with the default value 30.
  2. Attributes that are read-only:
    • Id (text)a
    • Section (integer)
  3. A DEFAULT CONSTRUCTOR where MaxEnrollment is set to 30.
  4. A parameterized CONSTRUCTOR that takes parameters for Id, Section, Description, Period, Credits, and MaxEnrollment and initializes the attributes to those parameters (USE CONSTRUCTORS)
  5. Your parameterized Constructor should verify that MaxEnrollment is not greater than 30. If the input for MaxEnrollment is greater than 30, it should be automatically set to the default of 30.
    • Hint: Check the Car example. You just need a simple if condition inside your parameterized constructor.
  6. A method called PrintCourseInfo which will print out information about the course in the following format:

Business Systems 2 (Course ID: ISM3255, Section: 5555)

Period: 2

Credits: 2

Maximum Enrollment: 30

Once you have designed your course class, write a MainClass with a main method. Your main method should:

  1. Instantiate a course objects (course1) with input from user (ReadLine for each attribute)
    • Hint: Test your code with hardcoded values first, so that you dont have to enter values every time you test your code.
    • Hint: Test your parameterized constructor by entering a value greater than 30 for MaxEnrollment
  2. Print out course1 attributes using the PrintCourseInfo method you created

Instructions for Submission

1. Your code should start with these two lines:

a. //Group Number: <your group number>

b. //PRESENT Members <members working on this assignment>

2. Submit both classes that you created as attachments using the E-Learning Assignment tool.

Reviews

There are no reviews yet.

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

Shopping Cart
[Solved] ISM3255 ASG06[Solved] ISM3255 ASG06
$25