0% found this document useful (0 votes)
3 views1 page

Assignment 1 Python

The document outlines five programming tasks involving object-oriented programming concepts in Python. Tasks include creating classes for Student, Car, Rectangle, and demonstrating single and multilevel inheritance with Animal, Dog, Person, Employee, and Manager classes. Each task specifies attributes, methods, and requirements for displaying information or calculating values.

Uploaded by

Saurav Mishra
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Assignment 1 Python

The document outlines five programming tasks involving object-oriented programming concepts in Python. Tasks include creating classes for Student, Car, Rectangle, and demonstrating single and multilevel inheritance with Animal, Dog, Person, Employee, and Manager classes. Each task specifies attributes, methods, and requirements for displaying information or calculating values.

Uploaded by

Saurav Mishra
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1.

​ WAP to create a class Student with attributes name and age, and a method to display
student details. Create at least two objects and display their information.
2.​ WAP to create a class Car with a constructor to initialize brand and price, and a method
to display car details.
3.​ WAP to create a class Rectangle with attributes length and breadth, and a method to
calculate and display the area. Take input from the user.
4.​ WAP to demonstrate single inheritance by creating a parent class Animal with a method
sound(), and a child class Dog that overrides the method to display its own sound.
5.​ WAP to demonstrate multilevel inheritance by creating classes Person, Employee, and
Manager, and display the details using the child class.

You might also like