Question: Relationship between Classes [9 marks] Read the following short passage of the text to identify the class candidates as well as their possible relationships -

Relationship between Classes

[9 marks] Read the following short passage of the text to identify the class candidates as well as their possible relationships - composition or aggregation that might exist among them:

Assume that we defined a teaching course with attributes: name, dept, year, semester (with values F Fall, S- Summer, W- Winter). Also semester is associated with:

  • course description (a paragraph of text),
  • professor with his office number, and a phone extension (note that one course could be instructed by only one instructor, and one instructor may teach several courses at the same time),
  • student may be enrolled to the course (note that course may have up to 30 students), and each student should receive an average course mark.

  1. [2 marks] First you have design a UML class diagram. You may choose to use aggregation/ composition where necessary.
  2. [5 marks] Java implementation: Implement all required classes in Java, according to UML class diagram. Create a test class with one course instructed by one specific professor, and add a list of students enrolled into this course. Note: at the end, the program should calculate a course average students mark for particular course. You are expected to add all programming comments in your code.

Lastly, you have to design a UML object diagram.

  1. [2 marks] Reflections document in PDF or DOC format. Prepare a separate document to reflect on how you have completed Assignment. Reflection is nothing but your personal commentary on your own contribution and coding habits.
    1. Add a picture of your UML diagram (from [1]), with brief description;
    2. Add how the essential classes, methods, parameters, or entire programs were designed and handled while implementing the project.
    3. Add screen shots from your final demo (project run), copied from the console as is
    4. Add your reflection includes some of the following:
  • Significant types of errors/warnings you faced when coding programs
  • Whether you were able to correct these errors/warnings quickly
  • What debugging strategy you used, e.g., searched the Web for a solution, contacted tutor, solved by self, used a debugging tool, talked to a friend, . . .
  • What commenting strategy you used, eg., Javadoc or inline commenting of key methods and variables, . . .
  • What testing strategy you used, eg., tested for typical inputs, extensively tested the code, . . .
  • What code optimization techniques you followed, if any (e.g., unused local variables, parameters, and private methods; wasteful string usage; unnecessary if statements and for loops that could be while loops; duplicate code; etc. . .
  • Resources that you referred to (online resources, book references, etc)
  • Other comments that reflect on the process of your personal learning to program
  • You do not need to include all those points! As you can see, the reflection component is quite fluid and personal.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!