0% found this document useful (0 votes)
19 views2 pages

PP II Write Up Points (Assignment 4 To 5)

PPT

Uploaded by

ganesh.jagadale
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)
19 views2 pages

PP II Write Up Points (Assignment 4 To 5)

PPT

Uploaded by

ganesh.jagadale
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
You are on page 1/ 2

Assignment No: 4

Title / Problem Statement:

Write a Python program to define a class called Product with attributes like product
name, price, quantity, and methods like add_stock, sell, and get_stock_value. Create
objects for different products and implement functionalities to add stock, sell
products (updating quantity), and calculate the total value of the inventory. Consider
including additional features like managing different categories and discounts.

Note - Use the OOP feature Inheritance.

Course Outcome: CO115.2: Implement advanced OOP concepts and exception


handling.

Theory:

● What do you mean by Inheritance.


● Use of Super Keyword in inheritance with Syntax & example

Algorithm:
Flowchart:
Input:
Output:
Infe
Assignment No: 5
Title / Problem Statement:

Write a Python program to define a base class called Food with attributes like name and
price. Create derived classes like Fruit, Vegetable and Dessert inheriting from Food. In each
derived class, implement a method called get_category() that returns the category of the
food (e.g., "Fruit", "Vegetable", or "Dessert"). Create objects of different food items and
call their get_category() methods to print their category.
Note - Use OOP feature Polymorphism

Course Outcome: CO115.2: Implement advanced OOP concepts and exception handling.

Theory:
a) Polymorphism:
b) Method overriding and overloading.
c) Operator overloading.

Algorithm:
Flowchart:
Input:
Output:
Inference:

You might also like