Course - Course.java Author Lewis/Loftus Solution to...

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

View Full Document Right Arrow Icon
//******************************************************************** // Course.java Author: Lewis/Loftus // // Solution to Programming Project 4.7 //******************************************************************** / public class Course { private String name; private int numStudents; private Student student1; private Student student2; private Student student3; private Student student4; private Student student5; //----------------------------------------------------------------- // Sets up a Course object with the specified name. //----------------------------------------------------------------- public Course(String courseName) { name = courseName; numStudents = 0; } //----------------------------------------------------------------- // Adds a student to the course. If more than 5 students are // enrolled, method does nothing. //----------------------------------------------------------------- public void addStudent(Student newStudent) { numStudents ++; switch (numStudents) { case 1 :
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/17/2011 for the course COP 3530 taught by Professor Davis during the Spring '08 term at University of Florida.

Page1 / 2

Course - Course.java Author Lewis/Loftus Solution to...

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