Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Quiz; Class: OBJECT-ORIENTED PROG I; Subject: Computer Science; University: University of Maryland; Term: Fall 2004;
Typology: Quizzes
1 / 3
CMSC131 Fall 2004 Quiz #7, Duration 25 Minutes
First Name: Last Name: Student Id: Section time (10am/11am): TAs:
Problem Description
A class called WaitList represents a set of students waiting to get into a course. The class relies on a Student class defined as follows:
/* YOU MAY NOT MODIFY THIS CLASS */ public class Student { private String name; private int id;
public Student(String sname, int sid) { name = sname; id = sid; }
public Student(Student student) { name = new String(student.name); id = student.id; }
public int getId() { return id; }
public String toString() { return name + " " + id; } }
WRITE YOUR IMPLEMENTATION ON THE NEXT PAGE
WRITE YOUR IMPLEMENTATION ON THIS PAGE