0% found this document useful (0 votes)
6 views

Assignment 1 Spring 2023

Uploaded by

New Pixcel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Assignment 1 Spring 2023

Uploaded by

New Pixcel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

CMSE 318 – CMPE 410

Warm-up to Python and file processing


Assignment 1
To be done in groups of two. Pick your partner!

Write a Python program that keeps information about students. A student will have the attributes
student number, first name, last name, date of birth, sex, and country of birth. Create a Student
class, with getter and setter methods for private attributes. Have an array of Student objects for keeping
the student information. The array should be able to contain 100 students.

Your program should have the following menu structure:

 Write the contents of the student array to a file


 Read student data from a file and populate the student array.
 Add a new student
 Find a student by student number, and show all the information about that student,
including the age of the student
 Show all students (all the information about them: name, lastname, age etc.)
 Show all students who were born in a given year (e.g. 2000)
 Modify a student record: input the student number, ask the field to modify, and get the
new value from the user. Modify the record accordingly.
 Delete a student with a specific student number.
 Quit

Grading: The project itself will be given a grade, which will be common to both partners
who did the project. Then, a separate grade will be given to each partner, which will be based
on the judgment of the grader, corresponding to how well each partner answers questions on
the project.

What to upload to Teams (Printed copy of the report should be submitted to the
Assistant). A zip file containing
1. A report which contains
a. your commented Python program, where you explain what each method does
b. sample run which demonstrates that each menu option works correcty (so for
example, to demonstrate that deletion works, print the array contents before
the deletion, do the deletion, and then print the array contents again. Take
sreenshots at every step and put them in your report.
2. File containing the Python program that can be run if needed.

You will also be asked to demo your program by the assistants during the lab hour.

You might also like