Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Other

object oriented programming mid term paper

Rating
-
Sold
-
Pages
2
Uploaded on
08-11-2022
Written in
2021/2022

This is the question paper of oop that help students to recognize the important question of your course

Institution
Course

Content preview

Time allowed: 90 Minutes+ UNIVERSITY OF GUJRAT Course Title: Object Oriented
1 hour for submission Mid Term Exam Spring 2021 Programming
Maximum Marks: 25 Computing & IT Course Code: CS-103, SE-103
Name: _________________ Roll No: ___________________
______________________________________________________________________

Attempt all questions. Each question carries equal marks:
Q1. A static member function can be called even if no objects of the class exist.
Your task is to write a program by using the concept of static features of the class
to justify the above given statement? (2.5 marks)


Q2. A class constructor initializes data members in two ways through
Assignment and through Initializer List. Based on your understanding compare
these to initialization techniques used by a class constructor to initializes data
members of class? (2.5 marks)

Q3. Give two reasons to justify the following statements. (2.5 marks)
• Structure objects are stored on stack.
• Class objects are stored on heap.

Q4. Whenever an object of a class is declared as a data member in another class it
is known as a container class. In the containership the object of one class is
declared in another class. Based on your understanding write a code to explain
containership and container class concept? (2.5 marks)

Q5. Composition and aggregation are two types of association which is used to
represent relationships between two classes. Your task is to compare these two
types of association briefly? (2.5 marks)

Q6. Write a program that counts the number of objects created and destroyed for
a particular class? (2.5 marks)

Write a time converter code using type conversion, with the help of constructors
and operator keyword. There should be two classes named as time24 and time12.
Time12 should have an overloaded constructor and operator type function.
Q7. 24-hour format to 12-hour format. (2.5 marks)
Q8. 12-hour format to 24-hour format. (2.5 marks)
Page 1 of 2

Written for

Course

Document information

Uploaded on
November 8, 2022
Number of pages
2
Written in
2021/2022
Type
OTHER
Person
Unknown

Subjects

$6.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
muhammadsaad

Get to know the seller

Seller avatar
muhammadsaad
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions