Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What is a class in programming?
Think of it as a template.
What are attributes?
Consider physical properties of an object.
What is the purpose of a class in object-oriented programming?
Think about what a blueprint is used for.
True or False: An object can have different attributes from its class.
Recall how objects are created.
Design a class named 'Library' that has attributes like name, location, and number_of_books. Include methods such as add_book() and borrow_book().
Think about what a library would manage
Create a 'Student' class that includes personal attributes like name, age, and grades, as well as methods to enroll in a course and calculate the average grade.
Consider what information belongs to a student.
6 more questions in this section. Enroll free to practise them all.
Enroll free