
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
You are supposed to develop a user login. This login page should ask the user to enter the 4 digits PIN Code in order to get access to other features. You are supposed to code the following functionalities:
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi
Lab Duration: 3 hrs. CS112 Object Oriented Programming Lab Marks: 10
Lab No: 09 Dated: 20/05/
Task 1:
Write a C++ program to create a class shape as a base class with length, breadth and area as data members declared as protected for this class and make constructor for setting values, virtual area and virtual display functions to find area of the shapes and display the name of the shape and other essential component of the class. Create derived classes rectangle, triangle and trapezoid each having overridden functions area and display. Create objects for these derived classes and point virtual members using pointers. Write a suitable program to illustrate virtual functions.
Note that area of rectangle, triangle and trapezoid are l*b, ๐ฅ โ ๐/๐ ๐๐ (๐ฅ + ๐) โ ๐ก
Task 2:
Write a program with base class Account and two derived classes (Current and Saving). Using Polymorphism concept write methods that will calculate and show:
Annual Increment Zakat deduction
Additional Notes: