CS4: Assignment On Programming

CS4: Assignment On Programming 1

Answer All Questions in Section A and One from Section B

  1. (a) i)         Define the term a bug as used in programming.                    (01mark)

ii) Differentiate between source code and an object code. (02marks)

(b)      i)           Identify three high level programming languages.        (03marks)   

ii) Give four advantages of low level programming languages.    (04marks)

2.    (a) State two categories of programming language translators             (02 marks)

(b)       Give two ways how interpreted program is different from compiled program.                                                                                                                                              (02 marks)

(c)    Re-arrange the following programming stages in their ascending order.

Coding & code review/documentation/Planning/analysis and design  (04 marks)

  • Using a Flowchart, design a program that can output a phrase “I Love My School”.                                                                                                                 (02 marks)

 3. (a)       Define the term    translator                                                 (01mark)

(b)   Suggest two characteristics of a good programming language.       (02marks)

(c) Write down three language processors.                                                  (03marks)

(d)   Give one example of;

i) High level programming language.             (01mark

  1. ii) Low level of programming language.                                     (01mark)

(e)       Give two advantages of High level programming language over low level

programming languages.                                                               (02marks)

High level programming language Low level programming language
   
   
   
   

4.(a) Demonstrate any three methods of error detection in a program code. (03 marks)

(b) Give three considerations of developing a computer program                 (03 marks)

(c) Define the following terms in relation to computer programming:

(i).         Code.                                                                                                 (01 mark)

(ii).        Alpha Test                                                                                        (01 mark)

(iii) Variable                                                                                                   (01 mark)

(iv) Encapsulation                                                                                         (01 mark)

6.(a) Give three reasons why a flowchart would be used instead of a pseudocode to solve a (03 marks)

(b). Differentiate between a Keyword and a syntax.                                      (02 marks)

  • Explain the function of each of the following programming concepts
  • Termination (01 marks)
  • Variable declaration             (01 marks)

7. State the uses of a compiler to a programmer             (03 marks)

8.(a) During program testing there are 5 main types of errors that can be encountered, identify at least three of these errors.                                                 (03 marks)

(b) Kato was assigned a task by the computer teacher to develop a program that computes the radius of a circle whose area is to be entered by the user using either C or VB language. Assist Kato to write a working program code according to the task assigned to him by the teacher.                                           (04 marks)

(c) Write a pseudocode for a program that can be used to classify people according to age. If a person is more than 20 years; output “Adult” else output “Young person”.                                                        (03 marks)

SECTION C (20 MARKS)

Answer only one question from this section. 

9. (a) Differentiate between coding and debugging in relation to computer programming.              (02 marks)

(b) Explain the various characteristics of a good software.                         (06 marks)

(c) Identify Six (6) major steps taken when designing a program.              (06 marks)

(d) Draw a flowchart for a program that would be used to classify animals according to sex.  If a letter M is input, the program should display ‘Male’ otherwise it should display “Female”.                          (06 Marks)

 

10. The Harrisburg City Manager wants an application that determines voter eligibility and displays one of three messages. The messages and criteria for displaying each messages are as follows;

The manager has assigned you to develop a working application for this company, in your preparations develop a pseudocode, a flow chart and finally choose from VB or C languages to write a code that will be used for this application.  (20 Marks)

11. (a) Explain the six standard set of symbols used to draw program flowcharts as created by American National Standard Institute (ANSI).                         (08 Marks)

(b) With aid of a pseudocode and a flowchart, design an algorithm that: Prompt the user to enter two numbers X and Y, Divide X by Y.  However, if the value of Y is 0, the program should display an error message “Error: Division By Zero”. Use C or VB language, write its program code.                                            (12 marks)

KAKURU BENARD

Kakuru Benard is a distinguished specialist in Digital Learning and teaching. A consultant trainer and researcher in ICTs, computer science and geography, Kakuru has also published books with the Uganda National Curriculum Development Centre, undertaken Interactive and Adaptive Digital Content Creation with Yaaka Digital Network (www.yaaka.cc), digital content creation and optimization for online learning, and digital classrooms in order to help learners and teachers improve at all levels. Since 2015 Kakuru Benard has taught ICT, trained teachers, tutors and lecturers in ICT Integration, multimedia and digital communications and digital pedagogy, helping them to learn and teach better in organizations and schools including Equatorial College School, St Joseph of Nazareth High School, Yaaka Digital Network, as well as Multimedia and 21st Century Skills trainings with Makerere University Department of Journalism and Communication, Brac Uganda, Uganda Christian University, Ultimate Multimedia Consult, Uganda Martyrs University, UNICEF, US Mission and FAWE Uganda. Kakuru Benard is a graduate from Uganda Martyrs University.

Leave a Comment
Share
Published by
KAKURU BENARD

Recent Posts

QUESTION 4

4(a) what are your roles as citizen of Uganda?   (b) Each and every  individual in…

1 year ago

QUESTION 3

3(a) why do we political Eduction in the New Uganda curriculum?    (b) Explain the roles…

1 year ago

QUESTION 2

2(a) Describe the creation story in relation to the origin of man.    (b) Explain why…

1 year ago