Write an outline of a programming challenge for Python Classes and Objects with multiple…
- User
Write an outline of a programming challenge for Python Classes and Objects with multiple steps and using markdown.
Assistant
Python Classes and Objects Programming Challenge
Challenge Name: "University Management System"
Objective: Design and implement a Python program using Classes and Objects to manage a simplified University Management System. This challenge will help reinforce object-oriented programming (OOP) concepts such as encapsulation, inheritance, and polymorphism in a practical context.
Challenge Outline:
Step 1: Define Core Classes
- Class 1:
Person- Attributes:
name(str)age(int)email(str)
- Methods:
__init__(initializer)display_details(print person's information)
- Attributes:
- Class 2:
Student(Inherits fromPerson)- Additional Attributes:
student_id(str)courses(list ofCourseobjects or str for simplicity)
- Additional Methods:
enroll_course(add course tocourseslist)drop_course(remove course fromcourseslist)display_courses(print all enrolled courses)
- Additional Attributes:
- Class 3:
Professor(Inherits fromPerson)- Additional Attributes:
professor_id(str)teaching_courses(list ofCourseobjects or str for simplicity)
- Additional Methods:
assign_course(add course toteaching_courseslist)release_course(remove course fromteaching_courseslist)display_teaching_courses(print all assigned courses)
- Additional Attributes:
Step 2: Implement University Class
- Class 4:
University- Attributes:
name(str)
- Attributes:
- Class 1:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.