Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

different exercise and exam, Exams of Computer Programming

computer science master program entrance exam

Typology: Exams

2018/2019

Uploaded on 08/08/2019

dursaabdu
dursaabdu 🇪🇬

4.6

(7)

3 documents

1 / 9

Toggle sidebar

Related documents


Partial preview of the text

Download different exercise and exam and more Exams Computer Programming in PDF only on Docsity! The exam has 5 parts 1. Programing (25%) 2. Software Engineering (15%) 3. Data base system (25%) 4. Internet programming (15%) 5. Networking (20%) PART 1: PROGRAMMING 1. Write down output of the following code fragment in the space provided. (2 marks) Code Fragment Int n=8} While {n>=4}{ For {int c=2} c<n} c++} { If {n%2==0} Cout<<”x”} Else Cout<<”0”} } Cout<<endl} n=n-1} } 2. A perfect number is a number whose positive divisors, aside from itself, add up to itself. Write a(c++ or java)function named perfect which takes positive integer and returns true if the number is perfect and false otherwise .(4 marks) 3. Identify appropriate attributes and methods for square and rectangle classes and code the inheritance hierarchy shown in the left in java. The code has to be written in such away that the object oriented concepts (Encapsulation, Data Abstraction, Procedural abstraction, polymorphism) are manifested. Write main function to test your implementation. Referring your code (a line or a group of lines) describe succinctly the object oriented programming concepts mentioned. (8 marks) SquareRectangle PART 3: DATA BASE SYSTEM 1. Explain the three levels of database design.(3 marks) 2. What is the difference between stored and derived attributes? Mention examples.(3 marks) 3. Define referential integrity and show its important.(4 marks) 4. Based on the following functional dependencies, determine the normal form of the relation SCHEDULE(explain why?)and, if necessary, bring it into a set of 3NFrelations. (5 marks) Dependences Section#, course ID, semester ID→ room No Section#, course ID, semester ID→ Inst _ID Section#, course ID, semester ID→ Week _day Section#, course ID, semester ID→ Start_time Section#, course ID, semester ID→ End_time Course_ID→ Course Name Room No→ Occupancy Inst_ID→ Instr _ name SCHEDULE (course ID,courseName,section#,semesterID,RoomNo,Occupancy,Inst_ID,Instr_Name,week_day ,Start_time,End_time) 5. Draw ERD for the following scenario:(5 marks) As apart of its project management database, a company wants to store information about recourses (employees), projects and bookings. For each employee, the following information is stored:Employee ID,first and last name,Rank,billing rate.employees are organized into solution sets (SS),each solutionset has a head of the solution set, who is the resource owner for all employees in that ss. The each solution set we record the SSID and the SS name, for scheduling purposes, we went to store information about the head of each solution set, and about assignment of employees to solution sets. An employee’s stores information about project. For each project, the following information is stored: Project ID,Status, Location and client name.as apart of the scheduling system, we store information about each colander day in a year. When a booking is requested for an employee, the employee is scheduled to work on particular project, on a particular day for the specified amount of time. For each booking we also record current status. 1. PART 4: INTERNT PROGRAMMING 1. Define a socket? How read and write performed using sockets?(3 marks) 2. What are the major components of a web browser? Draw aneat diagram to explain them.(4 marks) 3. What is the advantage of caching in a web browser?(4 marks) 4. IP specified that diagram can arrive in a different order than they sent. If fragment from one datagram arrives at a destination before all the segments from a previous datagram arrive. How does the destination know to which datagram the fragment belong?(4 marks)
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved