work about projects random and final paper, Assignments of Network Design

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

2020/2021

Uploaded on 06/14/2021

kiran-shah
kiran-shah ๐Ÿ‡ต๐Ÿ‡ฐ

3

(1)

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
FACULTY OF COMPUTER SCIENCE AND ENGINEERING
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/2021
Before performing tasks, keep in mind following rules:
1. CHEATING IS NOT ALLOWED. Looking at someoneโ€™s else screen is also cheating.
2. Mobile phone and internet usage are not allowed.
3. If you have any queries related to task, you can ask instructors only. Never talk to each
other until you are allowed.
4. Do not answer any query until you are asked.
5. Perform all the tasks.
6. Avoiding any of the above rules will lead to marks detection.
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:
1. For Saving account increment is 5% and for current account there is no increment
2. Zakat deduction ratio is 2.5%
3. Initial balance is 10,000 for current class and 20000 for the savings class.
Show the total amount after the deductions.

Partial preview of the text

Download work about projects random and final paper and more Assignments Network Design in PDF only on Docsity!

FACULTY OF COMPUTER SCIENCE AND ENGINEERING

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/

Before performing tasks, keep in mind following rules:

  1. CHEATING IS NOT ALLOWED. Looking at someoneโ€™s else screen is also cheating.
  2. Mobile phone and internet usage are not allowed.
  3. If you have any queries related to task, you can ask instructors only. Never talk to each other until you are allowed.
  4. Do not answer any query until you are asked.
  5. Perform all the tasks.
  6. Avoiding any of the above rules will lead to marks detection.

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:

  1. For Saving account increment is 5% and for current account there is no increment
  2. Zakat deduction ratio is 2.5%
  3. Initial balance is 10,000 for current class and 20000 for the savings class. Show the total amount after the deductions.