Write a class called course, which contains: • Two class variables, attributes, name: string, the class name with value "Programming in Python", and sections: integer, that has an initial value of 0 and counts the number of sections. • Two instance hidden variables grades: list of integers and ID: integer • A constructor that initializes the object variables to given values and increments the sections by one, ID has a default value of 1. • A method updateGrades(gradeslist) that sets the list of course grades. • A method getAverage() that returns the average of course grades. Write a subclass called training that is derived from the course class and contains one method called getSections(() that returns the sections count.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter4: More Object Concepts
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question
I need the answer as soon as possible
Write a class called course, which contains:
• Two class variables, attributes, name: string, the class name with value "Programming in
Python", and sections: integer, that has an initial value of O and counts the number of
sections.
• Two instance hidden variables grades: list of integers and ID: integer
• A constructor that initializes the object variables to given values and increments the
sections by one, ID has a default value of 1.
• A method updateGrades(gradeslist) that sets the list of course grades.
• Amethod getAverage() that returns the average of course grades.
Write a subclass called training that is derived from the course class and contains one
method called getSections() that returns the sections count.
Transcribed Image Text:Write a class called course, which contains: • Two class variables, attributes, name: string, the class name with value "Programming in Python", and sections: integer, that has an initial value of O and counts the number of sections. • Two instance hidden variables grades: list of integers and ID: integer • A constructor that initializes the object variables to given values and increments the sections by one, ID has a default value of 1. • A method updateGrades(gradeslist) that sets the list of course grades. • Amethod getAverage() that returns the average of course grades. Write a subclass called training that is derived from the course class and contains one method called getSections() that returns the sections count.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Encryption and Decryption
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,