- Abstraction
- Classes
- Structs
- Properties
- Initialization
- Comparing Values Type and Reference Types
- Protocols
- Inheritance
-
Task 1: Write a program to create a class named shape. In this class we have three sub classes circle, triangle and square each class has two member function named draw () and erase (). Create these using polymorphism concepts.
-
Task 2: Imagine you are making a social app for sharing your favorite books. Create a Book struct with four variable properties: title, auther, pages and price. The default values for both title and auther should be ann empty sting, pages should be defualt to 0, and price should be default to 0.0
-
Task 3: Create a variable instance of Book called favoriteBook without supplying any arguments. Print out the title of the favoriteBook. Does it currently reflect the title of your favorite book? propapbly not, Change all four proproties of favoriteBook to reflect your favorite book. Then using the proprities of favorite book, print out facts about the book
Wednesday 29 September