This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: . . Fall 2007 CSC/CPE 365: Database Systems Alexander Dekhtyar . . Lab 1: Why Databases? Part I Due date: Tuesday, September 25, at the beginning of the lab period !!!! Lab Assignment Assignment Preparation This is a team lab. You can organize yourselves in teams of 2-3 people each. Once you build your team, one member of the team needs to email me at [email protected] . The email message should have the header ‘‘CSC 365: Lab 1" . In the body of the message, please put the names and emails of all team members. You are responsible for finding your teammates for this assignment, and you need to do it fast. I will assign teams for anyone who has not been able to team up. The Task The assignment consists of two parts. The first part of the assignment is given to you now. The second part will be given to each team, once the team reports completing the first assignment. You are given a list of students of a local elementary school together with their class assignment. The list is stored in a file students.txt . Each line of the file stores information about exactly one student. The format of the line is: StLastName, StFirstName, Grade, Classroom, TLastName, TFirstName Here, StLastName and StFirstName identify the student, Grade specifies the grade the student goes to, Classroom specifies the classroom where the student studies, and TLastName and TFirstName identify the student’s 1 teacher. Grade and Classroom are integers (Kindergarden is 0), while all other fields are strings. Here is a sample line from the file: DROP, SHERMAN, 0, 104, NIBLER, JERLENE Not surprisingly, the line is to be read: “Sherman Drop is a kindergarden student assigned to the class of Mrs. Jerlene Nibler in the classroom 104”. Your goal is to write a program, which searches the students.txt file and outputs the results of the search. The following searches have to be implemented: • Given a student’s last name, find the student’s grade, classroom and teacher (if there is more than one student with the same last name, find this information for all students); • Given a teacher, find the list of students in his/her class; • Find all teachers who teach at a specified grade level; • Find all students at a specified grade level; Formal Specs You are two write a program called...
View Full Document
- Spring '08
- Databases, Computer program, batch processing, Given name