logo

Computer Programming Lab - Structures and Classes

10 Pages541 Words208 Views
   

Added on  2021-07-28

About This Document

This article is about Computer Programming Lab on Structures and Classes. It includes solved assignments and programs on creating a phone number database, movie database, student information system, and more. The tasks include creating a rectangle using a point structure, developing a student information system, and creating a movie database using structures.

Computer Programming Lab - Structures and Classes

   Added on 2021-07-28

ShareRelated Documents
Computer Programming Lab
spring 2021
Submitted by: ADNAN AYAZ
Registration No.: 20PWCSE1860
Class Section: A
“On my honor, as student of University of Engineering and Technology, I have neither given
nor received unauthorized assistance on this academic work.”
Student Signature: ______________
Submitted to:
SIR ABDULLAH HAMID
JULY 25, 2021
Department of Computer Systems Engineering
University of Engineering and Technology, Peshawar
Computer Programming Lab - Structures and Classes_1
Lab 10 &;11: Structures and Classes
Objectives:
To learn about data structures and classes in C++
Tasks:
Task 1:1. 1. A phone number such is (091) 767-8900 can be thought of as having three parts: the area
code (091), exchange (767) and number 8900. Write a program that uses structure to
store these 3 parts of a phone number separately. Assume name of the structure is
‘phone’. Create two objects of type ‘phone’, initialize one object and take the other one
from the user. Display both numbers.
Sample Run:
Enter you Area code, exchange, and number: 091 767 8900
My number is (042) 867-4982
Your number is (091) 767-8900
CODING:
Computer Programming Lab - Structures and Classes_2
OUTPUT:
Computer Programming Lab - Structures and Classes_3

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Java program for university admission application handling
|3
|883
|225

MITS4002 Activity 03.
|3
|402
|159

MITS4002 Activity 07.
|3
|414
|301

Individual Effort Sources for Materials
|4
|1480
|465