Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

the questions are on this top page. for background info, you can look at this : thanks A graduate student needs some additional attributes, so

image text in transcribed

the questions are on this top page.

for background info, you can look at this :

image text in transcribed

thanks

A graduate student needs some additional attributes, so we are defining it to be a subclass of Student: class GraduateStudent (Student): **"A graduate student. E Additional instance attributes = supervisor: The name of this graduate atudent's supervisor. meetings: The dates on which this graduate student's thesis committee meet. Each date is represented as a str. supervisor: str neetings: List (str) def init (self. st num: int, name: str, supervisor: str) -> None: *"Initialize this graduate atudent. self. supervisor = supervinor self.meetings = 0 1. As currently written, there is a bug in the GraduateStudent class. Suppose we ran the following throe lines of codo. Circle the line that will raise an excoption, and state what error will be raised. g = GraduateStudent (1234567. Ursula'.'Professor Fleet') E. complete_course ('csc148'. 92) g.supervisor 'Profesaor McIlraith 2. Modify the code as needed to fix the bug. 3. Graduate students must got a grade of 70 to earn credit for a course, Describe, in English, what change should bo made to the code to implement this. 4. Modify the code to implement the change from 3. Supposo wo are building a student rocords system like ACORN, and wo have started to write class Student: clans Student: **"A university atudent. Inntance attributes at num: This ntudent'n atudent number. name: Thia student'n name. courses: A dictionary containing the coursen thin atudent has taken. Each key in a courne code like cac148'. and itm value is the student n grade in the course. credits: The number of credits this student has earned. One credit is earned each time the atudent passes a course. at num: int name: ntr coursen: Dict (atr, int1 credits: int def init--(nelf, at_num: int. name: str) -> None: Initialize this atudent. nelf.nt num- at num self.name = nane self.courson = () nelf.credits = 0 def complete_course (nelf. course: atr, grade: int) -> None: *"Record the fact that thin ntudent has completed a course. self.coursen [course] grade if grade> 50: nelf.credita + 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Semantics Of A Networked World Semantics For Grid Databases First International Ifip Conference Icsnw 2004 Paris France June 2004 Revised Selected Papers Lncs 3226

Authors: Mokrane Bouzeghoub ,Carole Goble ,Vipul Kashyap ,Stefano Spaccapietra

2004 Edition

3540236090, 978-3540236092

More Books

Students also viewed these Databases questions