Assignment 2
Assignment 2
1. You’ve to write code in Python to make all these classes as per their specification and relationships in the diagram.
2. In the functinos/behavior in each class, just print a message, for example if you call shop.sell(), it prints “Shop Sells”. That’s it
3. Now you’ve to check which method can be called in which classes and why?
This grid will help you decide. Call all these combinations and put a tick in the gird below, everytime you don’t get an error.
Build() Construct() Create() Raise() Sell() Feed() Play() Reside() Livein() Cure() Teach() Enlighten() Retail() Vend() Trade() Merchandise()
Building
Commercial
Building
Residential
Biulding
Service
Building
Shop
Restaurant
Cinema
Flats
House
Hospital
School
Mosque
Store
Grocery
Store
Organic
Store
Vegetable
STore
Building
Build()
Behavior 2