project1

Otherwise you should print error missing entry

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: er of the faculty teaching this class (string) This command should add a class with the given parameters to the database. Note that a faculty identified by FID should already exist in the database to be able to add a class taught by that faculty. Otherwise, you should print “Error: Faculty does not exist!”. Addition of duplicate NAME is not allowed. In the case of attempting duplicate NAME addition, your program should print “Error: Class already exists!”. enroll: SNUM – identifier of the student to enroll in the class NAME – identifier of the class the student will enroll in This command should add an enrollment record with the given parameters to the database. Note that a student identified by SNUM, and a class identified by NAME should already exist in the database. Otherwise, you should print “Error: Missing entry!”. Addition of duplicate SNUM- NAME tuples is not allowed. In the case of attempting duplicate records, your program should print “Error: Enrollment already exists!”. get_students_in_department: This command should print the name, year and age of all students majoring in the department identified by DEPTID, displaying one record on each line Example: > get_students_in_department 001 Pelin_Angin, Freshman, 18 John_Smith, Sophomore, 19 Joe_Black, Junior, 20 get_students_in_class: This command should print the name, year and age of all students enrolled in the class identified by NAME, displaying one record on each line Example: > get_students_in_class INFSYS01 Jo...
View Full Document

This note was uploaded on 10/21/2013 for the course CS 348 taught by Professor Staff during the Fall '08 term at Purdue.

Ask a homework question - tutors are online