Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

only python 4. (25 pts) Please revisit the second question in Homework 06. Check the file called students.dat. In this file, there are 6 columns

only python
image text in transcribed
4. (25 pts) Please revisit the second question in Homework 06. Check the file called "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 not allowed to modify the input file. Additionally implement, five functions in Student class that print the necessary information. For example, when you say students[81709043).print birth_place(), it shall print "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.dar 1 number name surname birth place department opa 13726146 Luisa Morrow Dallas ME 1.80 01854182 Karla Wooten Birmingham C5 3.89 43447560 Pooja Peacock Scottsdale TE 3.52 B1709043 Mike Robin Detroit EE 2.40 30730594 Cleo Connelly Orlando CE 3.49 72922252 Roxy Blake Wichita 2.22 23937852 Arif Kenan Minneapolis CS 1.30

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions