Object-Oriented Programming 1: 2.1 Grade Book Assignment

  1. Getting started
    1. Make a copy of your OOP 1 GradeBook 1.2 folder and .sln file and rename the copied version to OOP 1 GradeBook 2.1.
    2. Open the newly created OOP 1 GradeBook 2.1 project in Visual Studio to complete this assignment.
  2. Define classes for teachers and assistants and instantiate objects
  3. The course needs a teacher and the teacher needs an instructional assistant. In this task, you will define classes to represent an instructor and a teaching assistant, define fields of those types, and instantiate those fields and set their values. You will check your work by setting a breakpoint, stepping through the code, and ensuring that all objects are instantiated correctly and all fields are set to the correct values.

    1. Define the Blackboard field in the MainWindow, as shown in the class diagram below. Then, instantiate the field instead of the local blackboard variable in the newGradeBookButton_Click and refer to the field throughout.
    2. 2.1 GradeBook - class diagram for instructor and teaching assistant classes
    3. Create the Instructor and TeachingAssistant classes in the Business Classes folder and define them as shown in the class diagram above.
    4. Define a Teacher field on the Course class and Assistant field on the TeachingAssistant class as shown in the class diagram above.
    5. Check your work: Build the solution and ensure that the code compiles without errors or warnings.
    6. In the newGradeBookButton_Click, instantiate the instructor and teaching assistant objects and set their fields as shown in the object diagram below.
    7. 2.1 GradeBook - object diagram for instantiating instructor and assistant objects
    8. Ensure that all code is StyleCop compliant.
    9. Check your work:
      1. Set a breakpoint in the newGradeBookButton_Click on the line that instantiates the Blackboard field.
      2. Start the application.
      3. Click the New grade book button.
      4. Press F10 to step over the code that instantiates Blackboard and sets the fields of Blackboard and the current student. Ensure all objects are instantiated correctly.
      5. Press F10 to step over the code that instantiates the course's teacher and sets the teacher's field values. Ensure that the Teacher field is instantiated correctly and that the rest of the fields are set to the correct values.
      6. Press F10 to step over the code that sets the teacher's field values. Ensure that the Assistant field is instantiated correctly and that the rest of the fields are set to the correct values.
      7. Press F10 to step over the code that sets the assistant's and calendar's field values. Ensure that each of the fields are set to the correct values.
  4. Submit a zipped Visual Studio solution by completing the following.
    1. Build the application and ensure that it has no compiler errors or warnings.
    2. Ensure that all code is StyleCop compliant.
    3. Browse to the project folder and add it to a newly created compressed, or zipped, archive.
    4. Submit the compressed, or zipped, project folder to the correct assignment in Blackboard.