Please share your current paper in the reply to this discussion.

Views: 117

Replies to This Discussion

ohh y to easy h kash mjhe same aisa i a jae

In Sha Allah sis

All the Best :)

Message ki definition thi,

operator overloading ka program,

generalization, specialization ka program,

1 program ka main part likhna tha,

r aik stream ka program tha.

Mcq's books se thy past se nhi thy

Todays mine paper
2 mcqs ae only past papers se 
2 qstn 3 marks k tny or 3 qstn 5 marks k
5 marks k 2 qstns m programm likhna ta 
ek 5 marks k qstn me OOP model bnana tha or isi me base class or derived class k objects ko alg alg kr k b btana tha
Computer table, table, chair, dining table and bed
ek qstn m messages and interface ka kch tha
or ek 3 marks k qstn m code tha uski output btani ti kch functon overload kr k



Consider the class given below,

class MySchool{


char * shool_name;

long ph_no;


MySchool(char * aName, long aph_no){

school_name = new char[strlen(aName)+1];

strcpy(school_name, aName)

ph_no = aph_no;





write the code for copy constructor in Deep copy.(3 marks)




write composed and composing object from the diagram. (3 marks)


Q3: What are constant functions? their benefits and how will we declare a constant function named as "GetInformation". 



class Complex


double real, img;


Complex & operator --( );  //pre-decrement

Complex operator --(int);   //post-decrement


COnsider the following code and write overloaded pre decrement and post decrement of c++ .(5 marks)


Q5:Suppose we have "amphibious vehicle" which is inherited from "water vehicle" and "land vehicle". Further, both "water vehicle" and "land vehicle" are inherited from Vehicle; Write  C++ code which shows multiple inheritance for above scenario

(5 marks)

My (cs304) Paper Midterm Fall 2017 ( 15 / dec / 2017 )

Total Questions = 23
MCQ’s = 18
Short Questions = 2
Long Questions = 3
Total Marks = 39


70% MCQ’s were from Moaz past midterm papers
They were easy

(Short Questions)

Q.19: Access Specifiers are used for friend functions/classes or not? Give answer with solid reason.
(3 marks)

Q.20: What is model? Give two examples. (3 marks)

(Long Questions)

Q.21: Consider a real world example of hospital. Patients are allocated beds in hospitals whereas it is hospital administration who provides beds to patients. Identify objects , Interaction among objects and draw the OO Model. (5 Marks)

 Consider the code below:

       class Student 


                 void setRollNo( int aNo );

Write a c++ code for the main function and create array of 10 objects & at the runtime set the roll no’s for students. (5 marks)

 Write a c++ code of Box class for the following output: (5 marks)

First box after creation Value : 0
Second box after creation Value : 25
After assigning value of Second box into First box
First box Value : 25




© 2018   Created by Irfan Khan MSCS.   Powered by

Badges  |  Report an Issue  |  Terms of Service