CS 12 - Team work
CS 12 Homepage
Preparation
As professional programmers, you will generally find yourselves working in teams,
which requires a whole range of personal, computing and organizational skills.
In this lab you will be working in pairs: first to complete some simple tasks
together, and then to develop two components that will have to work as a single
program. The two components will be 1) an application program; and 2) a class
required by the apllication.
The first task (to be completed together) is to write a small program to
assign one of the components to each team member.
Suppose the two members are Harry and Sally: your program should randomly
assign to them the task of either "application" or "class definition".
So the output of the program might be:
Harry: you will write the application program.
Sally: you will write the class definition
The project
The application will be the start of a college class management system. It will take
as input a file called "enrollment", which contains a list of students,
including the courses they are enrolled in, and outputs a file called
"classes", which will list all the classes being taken, each with
its own roster.
Exercise 1
Modify the Students class from
assignment 7 so that it uses a dynamic array to store the names
of all classes the student is currently enrolled in
- e.g. cs12 cs61 ee1a,
etc.
The names_ids.txt file from assn 7 has been modified to
enrollments.txt to provide sample data for this class.
Each data element is in the form FullName, SID, number of
classes, class names.
Write a small driver to test the class.
You can work on this together, or divide the task into 1) re-writing
the class interface & definition; and 2) writing the driver
Exercise 2
Together, design the interface for your "class" class. The details are up to you,
but you should include at least the name of the class, a count of enrollments,
and a dynamic array of students enrolled, with methods for inputting the raw data
(from the enrollments.txt file), and outputting the rosters of all classes.
This is really the critical phase! The product of this exercise will become the
blueprint for your complementary tasks of building the components of a working
program, so make sure you both completely agree on & understand how the class has to
behave, what the application will need from it, etc.
Exercise 3a
Write the class definition.
Exercise 3b
Write the application.
Grading
You will each receive the same grade for this lab - so you both need to make sure
that the whole program compiles & runs!
© 2003 UC Riverside Department of Computer Science &
Engineering. All rights reserved.