Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
10 views4 pages

2020 Programming Theory-1

The document is an examination paper for NVQ Level 05 in Software Programming, consisting of theoretical questions and coding tasks related to object-oriented programming concepts such as encapsulation, inheritance, and polymorphism. It includes practical coding exercises involving classes like Circle and Cylinder, as well as information systems and program control structures. Additionally, it contains tasks for creating user interfaces and handling inputs and outputs in software applications.

Uploaded by

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

2020 Programming Theory-1

The document is an examination paper for NVQ Level 05 in Software Programming, consisting of theoretical questions and coding tasks related to object-oriented programming concepts such as encapsulation, inheritance, and polymorphism. It includes practical coding exercises involving classes like Circle and Cylinder, as well as information systems and program control structures. Additionally, it contains tasks for creating user interfaces and handling inputs and outputs in software applications.

Uploaded by

xameye8867
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
AI RightsReserved ‘Department of Technical Education and Training 00005 1 | NVQ Level 05 Written Examination — December 2020 (March/April 2021) (Semester ) L National Diploma in Information & Communication Technology Software Programming - Theory | SSINVQ004 i Three Hours } Instructions: Answer three (03) questions from Part A, including the first (01") question. Answer only one question from Part B. Use appropriate computer language to write codes that you have learnt in the class. ni paper consists of 04 pages) Part A Refer the class diagram with association of Circle and Cylinder classes. ‘There are getArea() methods in both classes. The retuned value of a getArea() method is the surface area of the object derived from the class. TCrele The surface Area of circle: [*rectos: double na |+ getArea(): double ‘The surface area of a cylinder: 2nth + 2nr? Where 7’ is radius of a circle, and /1 is *ylinder height of a cylinder. - height: double + Cynder dubia, doubio h) I getea(: double () (@) Define the term object in object oriented programming. (b) Write codes to implement the constructor in Cylinder class to initialize all attributes of object derived. (02 Marks) (05 Marks) (i) (@) Define the term polymorphism in object oriented programming. (02 Marks) (b) Can an object of Cylinder be converted to an object of Circle? Explain your answer. (ii) (2) Define the term encapsulation in object oriented programming. (b) Write codes to implement a method in Cylinder class to get the value of height atribute from the outside the class. (05 Marks) (02 Marks) (05 Marks) (iv) (a) Define the term inheritance in object oriented programming. (02 Marks) (b) Explain the term method overriding, using getArea() methods. (05 Marks) (©) Write codes to implement the getArea() method in Cylinder class in order to return the surface area of a cylinder object. Inside the method, call to getArea() method of Circle class to calculate the area of circular sides of a cylinder. (07 Marks) 2. (i) Whats an information system? (03 Marks) (ii) Explain exception handling at developing information systems. (03 Marks) Gi) “A software which is written in a compiled language is executing faster than the software which is written in an interpreted language”. Do you agree with the statement? Justify your answer. (05 Marks) (iv) There are 3 program control structures. They are sequential, selection and iteration. IMlustrate each with flowcharts and codes. (09 Marks) Eyorse the given flowchart. Begiy Thput number, x win = Count = 1 MAIR counle Input x TE x > txtValue | btnCheck txtResult ‘Write code segments for each requirement asked in questions below. If you are using, vari @ ) (iii) (co) w) ables, declare them at each code segments. Move the value stored in tx1Value to extResult, (02 Marks) Display “Please enter a value” in ixtResult, ifthe txtValue textbox is empty. (03 Marks) Ifboth textboxes are not empty, swap values available in textboxes. (05 Marks) Store 5 values inserted through txtValue, in a string variable. Then display those numbers in textbox: txtResult. (07 Marks) If the value in txtValue is X, then display the value of X'°-1 intextbox: txtResult. (08 Marks) - bee

You might also like