Recent Question/Assignment

IMPORTANT INSTRUCTIONS FOR THE STUDENTS:
• Answer All Questions in the same Question Paper under each question/section subsequently.
• Upload the same at your SUIT PORTAL only and Answer Sheet sent through EMAIL will not be accepted.
• The total size of this file should not exceed 1MB at the time of uploading it at portal so don’t insert images.
• Just type the answers under each question, avoid inserting images and follow the instructions at SUIT Portal.
• Before uploading, save the file in this format FINAL EXAM_DEPARTMENT_COURSE_Student Name_Reg#.doc
• Copying, plagiarism, and sharing your answers with other students is strictly prohibited and disciplinary action will be initiated against such students
• The students must submit this answer sheet on SUIT Portal as an assignment till last step as mentioned in this video/tutorial before the deadline: https://youtu.be/Vnpz5nKkfgM
Attempt All Questions. Each Question Carries 10 marks. Mention the references (if any) as footnotes or at the end after completing the question.
Q#1: Answer the questions related to the following code:
Class B
{
Public:
Void b1();
Protected:
Void b2();
};
Class A : public B
{
Public:
Void a1();
Protected:
Void a2();
};
Class C: public A
{
Public:
Void c1();
};
Void main ()
{
B temp1; A temp2; C temp3;
}

a) Name all member functions of all classes visible through temp1 in the main function?
b) Name all member functions of all classes visible through temp2 in the main function?
c) Name all member functions of all classes visible through temp3 in the main function?
d) Which class is the parent of class A?
e) Which class is the child of class A?
Solution#1 (to be typed here by the student)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Q#2 : Answer the questions related to the following code:
a) What is the output after applying n -- (decrement operator) to the output produced by line 21?
b) What is the output after applying -- n (decrement operator) to the output produced by line 22?
Solution#2 (to be typed here by the student)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Q#3 : Write down an algorithm/steps for the following program:
Solution#3 (to be typed here by the student)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Q#4: When do early and late binding occur? Differentiate the two with examples?
Solution#4 (to be typed here by the student)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Q#5: What do you know about virtual function and pure virtual function? Differentiate the two with examples?
Solution#5 (to be typed here by the student)
• ANS
• A virtual which is a function that is defined in the base class .
It is preceded by the keyword “virtual” which tells the compiler to include dynamic binding in program.
• it must provide a definition in the class where it is declared.
• A pure virtual function is a function that is only declared in the base class.
• It dose not provide a definition. The class becomes an abstract class if it includes a pure virtual function.
Differentiate between virtual function and a pure virtual function
virtual function pure virtual function
• It contains a definition in the class which it is declared
• The function definition is overridden by the derived class.
• The class that contains a virtual function is not an abstract class.
• Object of the base class that contains a virtual function can be created as it is not an abstract class
• They do not help create interface classes.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Looking for answers ?


Recent Questions

i had a chat with Jimmy with regards to helping with my assignments . So as per the chat , I am attaching the files. There are two topics with 5 papers each. Let me know if you need more details. I need...HOLMES INSTITUTEFACULTY OFHIGHER EDUCATION Assessment Details and Submission GuidelinesTrimester T3 2020Unit Code HI6025Unit Title Accounting Theory and Current IssuesAssessment Type Group AssignmentAssessment...Group Assessment Details and Submission GuidelinesTrimester T3 2020Unit Code HI6026Unit Title Audit, Assurance and ComplianceAssessment Type Group AssignmentAssessment Title Assurance, Audit Fees and Good...Assessment 5: Case study reportAssessment type: Individual assignment (2000 words)Purpose: This assessment will allow students to demonstrate that they can identify, assess, and analyse the situation provided...Your Task• You are required to prepare a business letter to answer all of the following questions.• You are also required to prepare a short video presentation (3 to 5 mins) summarising the key issues...there are two files one word with every thing you need the other is excel to do calculation and depends on the output result write a report.RESTRUCTURING THE WATER AND SEWER UTILITY IN SAMZ________________________________________Major...This project requires you to design requirement specification models for Kayak Melbourne and finally recommend an appropriate solution that consists of several sub-systems. A sub-system is a system that...Show All Questions