Skip to main content

Homework 7: Object Oriented Programming - Student Schedule

The goals of this assignment are:

Requirements:

WARNING: In this assignment you are NOT ALLOWED to import any packages or classes besides for java.util.Scanner, java.io.File, and java.io.FileNotFoundException. For example, you cannot use the builtin Arrays java class to print out an array. Doing so will result in earning ZERO POINTS for a method that uses it.

IF YOUR CODE DOES NOT COMPILE, YOUR SUBMISSION WILL BE DEDUCTED ATLEAST 10%.

1. Instructor

We will begin this assignment by creating an Instructor class. The instructor class will be pretty simple. It contains the following information:

The Instructor class must have the following instance methods:

You must use your main method to test the implementations for all of the instance methods in this class.

2. StudentCourse

Implement a class named StudentCourse that represents a course in a student’s schedule. Each course should have the following information:

The StudentCourse class must have the following instance methods:

You can use your main method to test the implementations for the instance methods in this class but we will not be checking this, i.e. you will not be graded for testing these methods in main.

3. Student

Implement a class named Student that represents a student. Each Student should have the following information:

The Student class must have the following instance methods:

You can use your main method to test the implementations for the instance methods in this class but we will not be checking this, i.e. you will not be graded for testing these methods in main.

GPA

Since we are assuming that every course is 1 credit, the GPA is calculated by just taking the average of the grades earned in each course.

4. Driver

Create a new program called Driver.

The program should read in a filename as a command line argument. This file will list course information for all of the courses that a student has taken. We have provided an example csv file courses.csv that you can use to test your program.

If the program is not passed in a command line argument, the program should tell the user and terminate.

The program must print out the following information on a new line:

README.txt

In a text file called README.txt answer the following questions:

  1. How much time did you spend on the homework
  2. What did you learn from this homework
  3. optional: What did you struggle with during this homework
  4. optional: any other feedback you would like to share

Dont forget: make sure to fill in the header in all of your java files.

Submitting

Submit the following files to the assignment called HW07 on Gradescope:

  1. Instructor.java
  2. StudentCourse.java
  3. Student.java
  4. Driver.java
  5. README.txt

Make sure to name these files exactly what we specify here and name the methods exactly what we specify too. Otherwise, our autograders might not work and we might have to take points off.