Download as pdf
Download as pdf
You are on page 1of 14
if Object Oriented Programming (SCS 3rd) Government College University, Faisalabad Mid Term Exam Time Allawed; 50) Minutes Max Marks: [8 9 thest cheurly state your [rots asstui tan re hot alloted to ask any question. IF you find paysting arable .{ contaue solving the paper | brietty nv of Structured Progra: jet Progtractii ri ieye paratiqrs yp paradigm. (4m Question rN esplain hivw these limitations are overcomes by Object OF ny tee lav eateentepeoti Take [np from user for arr, Print arr ia of arr inka bre westion 2: Docluie an integerarray af size 10, named cise order. Then create anpther array naned Arr nnd wore the edd andeacd ehern I Brr on ssreen #8 marta Question 3: Connider the following program and pravide its output. Write thin program on yout answer sheet and your output in front of every line that display something. If Users is any errors} in the Program then clearly mentign the reason of error and cofinent ermoncous line(s} of code to ecatinus execution, You are pot required to corrcet those errarts} [Assume address of 1s 004, acldtess of fis 7008, and nidress of fin fo0ed vold maint If Int 419, J20: float f= coute<|; fs td marks) void Funglint” x, floats y, int e){ tunel, functsl, coute xt) y(imt) = getimt ft, at) + sett int) + setytint) + setztunt) + gent) + eciyt ) * petet ) © input ) ("Take input from userfor vs y,and = * display) Good Lack! Coursa Title: Odjact Onented Programm.ng ——— eT ED Time Allowed 89 Minutes we (19 Marks) Question 1: T= int color; = fost weight, height; oS cat(int ctr, Moat wht, float ht); | + void set(int cls, float wht, float ht); + int getColor( ): + Moat getwWeight( ); + float getHeight( + void input( ); + void display( ); input for all data members from wset | iid! If'we look around us we can see there are different kind of ings. You have to ture some of the buildings that at least includes Factories, ), Universitics(Private), Hospitals, Stations, Mosques, Houses and include any others that you want to. In the classification we can jes, and Offices are kind of Commercial Buildings, Hospitals, Stations, and Mosques are Public, and Houses and Apartments ere Domestic. Your task is: + Design your complete class hierarchy for these buildings. Your provided class bier: Jd be properly handling the Generalization end Specialization. For example Bank is a Commercial Building so in class hierarchy bank would be like Commercial | Bank class hierarchy to Banks(Priv «Provide class headers for implementation of these buildings. You are not required to provide definitions of your class member functions. Just provide their prototypes and comment out their purposes Some of the specifications ere given below: * Every Building would have Area(in sq feet), and Location( Address) that should be provided for every building. © Buildings can have many floors. ° Houses can ae © many rooms on a floor, * Factories can have Stores and Units. Units further can have many roo: i ae Y rooms and halls, Similarly you have to analyze other Buildings as well and Provide your classes accordingly, (10 marks) G0 Luck, 7 GOVERNMENT COLLEGE UNIVERSITY, FAISALABAD Final Examination Examination’ Fall 2021 8) Semester 3rd ol 202 f Tite, Object Oriented Programming 4(3-1) Course Code: CSI; er ‘Alowed 90 Minutes empling your exin Hf you find any ambiguity then cealy state Fetions: Do not ask any question while a “Surption and solve your question accordingly aver shect for solution of every question. (06 marks) following code. If here is any error then mark the error and write ‘of eose to continue writing your Output ont: ler he following classes and write output of Gin Afr reasoning the enor, ignore that erroneous fine Void eain t start of sain“ FINAL SEMESTER EX. re ; e=MESTER EXAMINATION February 2022 Sa Science) Semester: aaa Time : 150 mi c itle: Da Sehgal Course Title: Data Structures and Algorithm Question #01 (03+04) § : . DS Whatis recursion? Write a recursive algorithm for printing numbers from | ton © Write a recursive algorithm that displays the table of any number passed to a function. Question #02 (02+05) «s What is the difference between comparison and non-comparison sorting algorithms? Write an algorithm for selection sort (03405) are the applications of hashing in computing? 7 using hash function h = (al Question #03 What is hashing? What Draw the hash table for \s, 2}. M4, 21, 10, 12, extent and rehash approach if you find any collision. Question #04 (0305) . (Practical) (10) B and FIFO using examples and enlist she oP a) gsing counting sor. Dra all steps used to sort. Seo 6 || 212 |? z. this aay? Draw Gmany passes are required 10 So OE E—E Fyey, #1.) pelle Cae yA Ay —_ ay | vt WDE . ft : J Department vr Cumpures oeerern~ GC University, Faisalabad BSCS (3" semester) Mid Term Exam Intro. to statistical theory (STA-321) Course Instructor: Summera Fazal Date: 25" Nov 2021 Total Marks Time Allowed: | hour Attempt all Questions J! g Qt: Classify the following variables as discrete or continuous variable. 2) x . The life time of T.V tubes produced by a company. () ‘The number of students attending a class. (> ‘The amount of milk produced by a cow. Cteviti aves ry = ee ‘Temperature recorded every half hour at a weather bureau. (arin) 0 * Classify each as nominal, ordinal, interval or ratio level measurement. (4) i. Ranking of squash player. 9 >< li, Salaries of five executives in bank, 1Y tii, 1Q of students’ RC dv. Nationality evi. Shoe size X vii. Socioeconomic status. | viii. Ages of students ft Record of number of errors made in a certain time period. ('W Q3: Make a grouped frequency distribution for this data taking a class interval of 10 and first class must be started from minimum value. Also find cumulative frequency and class mark. (4) 109, 82, 74, 62,103, 85, 95, 105, 90, 116, 118, 91, 52, 83, 88, 99, 101, 52, 96, 76, 72, 84, 56, 89, 64, 77, 110, 104, 97, 101, 59, 107, 62, 62, 96, 46 Q4: The weights of 150 students are given below in the form of grouped data. oO) Weights 95-100 100-105 105-110 | 110-115 115-120 120-125 | 125-130 (lbs,) — Frequency | 7 17 37 aa 28 15, ll | Calculate: Mean by use of “Short-cut method”. Lower Quartile Mode iv. Construct histogram. - GOOD LUCK!!! QL: ¢ Q O4 os OF Computer Science + Faisalabad GOVERNMENT COLLEGE UNIVERSITY FAISALA. Roll No. Final Term Exam BSCS (M) 3"¢ Sem. i ‘Code: PHY-323 Course Title: Basic Electronics : Hours: 3(2-1) Course Instructor: Dr. Taqmeem Hussain pS Max. Marks: 20 Time allowed: Max. 120 min ee jote: Write your roll number on the top right of this Question paper. Hand over your solution to your exam invigilator. Maximum of 120 minutes are allowed for all Questions. All questions are COMPULSORY. SUBJECTIVE wing questions. Draw Figures or diagrams to (40 x1 = 10) Q1. Give short and appropriate answers to the follo elaborate your answer if necessary. violet, orange and gold while other resistor has orange, orange, ach with maximum and minimum possible values. i. Aresistor has color bands yellow, orange and silver. Give the resistance of e: ductors and capacitor i> Define conductors, e and current laws uctor if temperature is raised? Define the Kirchhoff's voltag What will happen to the resistance of conductor and semicondl red over germanium? rams ot NOT, AND and OR gates (using diodes or transistors) along with Why silicon is prefer vii.» Draw the circuit diag) their truth tables. tween LEDs and photodiodes? pn junction diode diagram. viii, How can you differentiate bet ics Define a pn junction diode and give its types. Make a biased x. What is impedance? Give its units. Isita scalar quantity oF vector? Explain your answer pl aracteristics of a properly biased common emitter transistor (5) Jaborate characteristics curves. lease. Q2. Define a BJT transistor. Give the ch circuit. Make neat and clean diagrams to el tification? Explain the half wave rectificati need to elaborate. con and full wave rectification. Make proper (5) Q3. What is rect diagrams wherever you a

You might also like