Course - public class Course public static void (String...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: public class Course { public static void displayStudentAndScore(String name, int score) { IO.outputStringAnswer(name); IO.outputIntAnswer(score); } public static void displayStudentAndOverallGrade(String name, double grade) { IO.outputStringAnswer(name); IO.outputDoubleAnswer(grade); } public static void main(String args) { int studentCounter = 0; System.out.print("How many graded items will there be? "); int numitems = IO.readInt(); if (numitems < 1) { System.out.println("There must be at least one graded item for the course."); IO.reportBadInput(); return; } System.out.print("How many students can register for the course? "); int maxstudents = IO.readInt(); if (maxstudents < 1) { System.out.println("You must allow at least one student to register for the course."); IO.reportBadInput(); return; } String student = new String[maxstudents]; double items = new double[numitems]; double itemScore = new double[maxstudents][numitems]; while (true) { System.out.println(); System.out.println("Menu:"); System.out.println("1. Set possible points (\"out of\") for graded item"); System.out.println("2. Add student"); System.out.println("3. Assign score"); System.out.println("4. Get student's overall grade"); System.out.println("5. Get class average on a particular graded item"); System.out.println("6. List students alphabetically"); System.out.println("7. List students, sorted by grade on a particular graded item (descending order)"); System.out.println("8. List students, sorted by overall grade (descending order)");...
View Full Document

{[ snackBarMessage ]}

Page1 / 6

Course - public class Course public static void (String...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online