0% found this document useful (0 votes)
262 views

Assignment 1-2.1.1 Problem-Solving and Design

This document contains instructions for 5 problems related to algorithm design and problem solving for a computer science assignment. Problem 1 asks to draw a flowchart for monitoring employee work hours. Problem 2 provides test data for a program calculating average age. Problem 3 describes validation checks for product codes. Problem 4 involves designing a program to match students to jobs. Problem 5 asks how to evaluate code effectiveness.

Uploaded by

Aditya Ghose
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
262 views

Assignment 1-2.1.1 Problem-Solving and Design

This document contains instructions for 5 problems related to algorithm design and problem solving for a computer science assignment. Problem 1 asks to draw a flowchart for monitoring employee work hours. Problem 2 provides test data for a program calculating average age. Problem 3 describes validation checks for product codes. Problem 4 involves designing a program to match students to jobs. Problem 5 asks how to evaluate code effectiveness.

Uploaded by

Aditya Ghose
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Computer Science Assignment # 1

2.1 Algorithm Design and Problem Solving

2.1.1 Problem Solving and Design


1. A multi-national company want to monitor the number of hours an employee spent in
office, from time of arrival till time of departure.
Draw a structure diagram and a program flowchart for an algorithm with the following
features:
(a) For each employee, enter the employee’s name, the time of arrival and the time of
departure.
(b) Calculate the length of time each employee spends in school.
(c) Output the employee’s name and time spent in company. [8]
2. A program has been written which is intended to accept the ages of the five members of a
secondary school chess team and to output the average (mean) age.
Each age is input in digits as a whole number of years.
State three different sets of test data that could be used as part of a test plan to test this
program, giving a reason for each set of data. [6]
3. A retail company has a number of stores located in many towns.
At the point of sale terminals, product codes are scanned. A typical product code is
0201776294; the last digit is a check digit.
Name and describe two validation checks that could be used on the product code before
the check digit is validated. [4]
4. ZAK is an employee doing a project assigned to him. He is working with a recruiting agency
which specializes in local part-time jobs for students.
The agency wants a program which allow the user to:
• Add details of a student to a file
• Add details of a job to another file
• Match students with jobs.
ZAK decides to produce a top- down design for the program. Part of this design is shown in
the structure diagram below.

Write the letters A,B,C and D in the blank boxes to show the most appropriate location for
the following modules.
A = Add new job
B = Append student record
Page 1 of 2
Computer Science Assignment # 1
2.1 Algorithm Design and Problem Solving

2.1.1 Problem Solving and Design


C = Match student to jobs
D = Print report of matches [4]
5. State that how can you evaluate that your code is effective? [3]

Page 2 of 2

You might also like