0% found this document useful (0 votes)
37 views2 pages

Quiz I - C - J - Paper A - Spring2020

This document contains a quiz for the CS 217 Object Oriented Programming course. It has 3 questions. The first question asks to briefly explain the OOP paradigm. The second question asks to identify the type of error(s) in a given program. The third question provides a case description and asks to identify all the classes and draw a class diagram for each class.

Uploaded by

Ahmed Ashraf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views2 pages

Quiz I - C - J - Paper A - Spring2020

This document contains a quiz for the CS 217 Object Oriented Programming course. It has 3 questions. The first question asks to briefly explain the OOP paradigm. The second question asks to identify the type of error(s) in a given program. The third question provides a case description and asks to identify all the classes and draw a class diagram for each class.

Uploaded by

Ahmed Ashraf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CS 217 Object Oriented Programming

Quiz I_Spring2020
February 20, 2020
Paper-A;

Student Name:__________________________________ Roll# _______________________ Section:_____________

1. Briefly explain the OOP paradigm. [2]

___________________________________________________________________________________________

___________________________________________________________________________________________

___________________________________________________________________________________________

__________________________________________________________________________________________.

2. Identify the (type of) error(s) in given program [5]

class A{ class B{ class C{ int main(){


A obj1; int a;
static int var1; static int sNo; int b; A objA(9,10);
const int var2=10; B objB;
public: public: C objC(9);
A(){} void change(int x) C(){}
A(int i,int j) { C(int i, int j) objA.print();
{ obj1.var1=x; { a=i; objB.change(12);
var1=i; } b=j; objC.print()
var2=j; }; }
} void print() return 0;
int A::sNo=0; { }
public: cout<<a<<b<<endl;
static void print() }
{
cout<<var1<<endl; };
cout<<var2<<endl;
}
};
3. Given the following case description, identify all the classes and draw class diagram for each class. [3]

“The movies are rented out in stores and there are several stores. Each store has a unique
distributor that supplies the store with tapes. Each distributor has a name, an address, and a phone number.
Each store has a name, an address, and a phone number. For each customer we have to keep the following
information: a name, an address, and a phone number (if any). About each tape we have to keep
information in what condition the tape is and what movie is on the tape. About each movie we have to
keep its title, director’s name, simple description, the name of a (multiple) major stars, the movie’s rating.”

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy