[SOLVED] ISM3255 ASG04

35.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

In this assignment, you will create two classes: MainClass and Course

The Course class should have:

  1. Attributes that can be read and written:
    • Description (text) // course name
    • Period (integer)
    • Credits (integer)
    • MaxEnrollment (integer)
  2. Attributes that are read-only:
    • Id (text)
    • Section (integer)
  3. A method that takes parameters for Id, Section, Description, Period, Credits, and MaxEnrollment and initializes the attributes to those parameters (do not use constructors)
  4. 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: 32

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

  1. Instantiate 2 course objects – course1 and course2 with some sample information
  2. Print out all the attributes of course1
  3. Print out course2 attributes using the PrintCourseInfo method you created
  4. Change MaxEnrollment attribute of course2
  5. Print course2 again (you can just copy/paste the code from steps 3)

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.

Not following the instruction will result in losing some of your assignment points

 

 

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.