Answered step by step
Verified Expert Solution
Question
1 Approved Answer
SOLVE WTH PYTHON ONLY PYTHON PYTHON 4. (25 pts) Please revisit the second question in Homework 06. Check the file calle students.dat. In this file,
SOLVE WTH PYTHON ONLY PYTHON PYTHON
4. (25 pts) Please revisit the second question in Homework 06. Check the file calle "students.dat". In this file, there are 6 columns representing number, name, surname birth place, department and GPAs of students. Implement a Student class and define attributes for this class (based on the columns of this file). Please read the data from the file and generate Student objects for each line and put them into a dictionary (called students) where key is the student number and value is the Student object. You are no allowed to modify the input file. Additionally implement, five functions in Student clas that print the necessary information. For example, when you say students[81709043). print_birth_place(), it shall prin "Detroit". students[student_number].print_name() students[student_number].print_surname() students[student_number).print_birth_place() students[student_number).print_department() students[student_number].print_gpa() students.dat number name surname birth place department gpa 3 13726146 Luisa Morrow Dallas ME 1.80 4 01854182 Karla Wooten Birmingham CS 3.89 5 43447560 Pooja Peacock Scottsdale IE 3.52 6 81709043 Mike Robin Detroit EE 2.40 7 30730594 Cleo Connelly Orlando CE 3.49 8 72922252 Roxy Blake Wichita ME 2.27 9 23937852 Arif Kenan Minneapolis CS 1.38 10 ! number name surname birth place department gpa 13726146 Luisa Morrow Dallas ME 01854182 Karla Wooten Birmingham CS 43447560 Pooja Peacock Scottsdale IE 81709043 Mike Robin Detroit EE 30730594 Cleo Connelly Orlando CE 72922252 Roxy Blake Wichita ME 23937852 Arif Kenan Minneapolis CS 1.80 3.89 3.52 2.40 3.49 2.27 1.38Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started