I'm trying to To create a Student object, the class constructor takes two arguments: a student ID (as a String) and a student name (as a String). I need to add courses to the student record, I need to use the method setCourseGrade. I need to retrieve the grade of a course, the method getCourseGrade can be used. I need to retrieve the entire list of courses in the student record, the methods getFirstCourse and getNextCourse can be used. I need to used two for loops(one for add courses and one for retrieve).

import java.lang.String;
import type.lib.Student;
import java.io.PrintStream;
import java.util.Scanner;

public class Lab8{

public static void main(String[] args){

Scanner input = new Scanner(System.in);
PrintStream output = System.out;
Student information = new Student("123456789", "Felix Ho");

String[] courses = {"1010","1011","1620","2010","2610","2620","3020","3210","3220","3230"};
String[] grades = {"A","B","A","C","D","B","D","C","C","B"};



I GET STUCK TO ADD COURSES TO THE STUDENT RECORD, I need to use for loop to add all 10 courses and set the corresponding grades to the Student object. Also, Use one for loop to retrieve and print the student record.

Edited by ki72: n/a

7 Years
Discussion Span
Last Post by masijade

Well, let us see what you've tried. We are more than happy to help you complete it, and "get it right" but, nobody here is simply going to do it for you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.