Share Pastebin
Guest
Public paste!

Course

By: a guest | Mar 16th, 2010 | Syntax: Java | Size: 0.97 KB | Hits: 60 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. public class Course
  2. {
  3.         private String courseTitle;
  4.         private String instructor;
  5.         private Student students[5];
  6.         private int numStudent;
  7.        
  8.         public Course(String courseX, String instructorX)
  9.         {
  10.                 courseTitle = courseX;
  11.                 instructor = instructorX;
  12.         }
  13.        
  14.         public boolean addStudent(String nameX, int idX)
  15.         {
  16.                 int count;
  17.                
  18.                 for(int i=4; count<i; count++)
  19.                 {
  20.                        
  21.                 }
  22.         }
  23.        
  24.         public boolean dropStudent(int idX)
  25.         {
  26.                
  27.         }
  28.        
  29.         public void setScores(int idX, double quizX, double mid1X, double mid2X)
  30.         {
  31.                
  32.         }
  33.        
  34.         public int getNumberStudents()
  35.         {
  36.                 int count=0;
  37.                 int num=0;
  38.                
  39.                 for(int i=4; count<i; count++)
  40.                 {
  41.                         if(students[i]!=null)
  42.                         {num = num + 1;}
  43.                 }
  44.         }
  45.        
  46.         public void report()
  47.         {
  48.                 System.out.println("---------------------------------------------------");
  49.                 System.out.println(courseTitle + " Course Report");
  50.                 System.out.println("---------------------------------------------------");
  51.                 System.out.println("Instructor: " + instructor);
  52.         }