Humble Test Programing
Humble Test Programing
A program needs to make sure the characters input for a product code meet these rules :
• The last four characters must be a number in the range 1000 to 9999 inclusive.
(a) Identify three validation checks and state how each check would make sure the product code
met one of these rules.
(b)
The program design will include a pseudocode algorithm. Assume that the product code is
stored in the variable Product.
Write the pseudocode to make sure that the product code is six characters in length.
(a) A programmer is writing a program to implement the algorithm and decides to use library
routines to provide part of the solution.
State three possible benefits of using library routines in the development of the program.
(b)ii. The following pseudocode statement includes array references:
OUTPUT "Student ", Name[Count], " scored ", Mark[Count] State the purpose of the variable
Count and give its data type
Write purpose and dta type.
(i) State two reasons why the programmer may decide to use a subroutine.
(ii) A procedure header is shown in pseudocode: PROCEDURE MyProc(Count : INTEGER,
Message : STRING) Give the correct term for the identifiers Count and Message and explain
their use.
(b) The algorithm in part (a) is part of a program that will be sold to the public. All the software
errors that were identified during in-house testing have been corrected. Identify and describe
the additional test stage that may be carried out before the program is sold to the public.
Q5. Writing a program that generates a multiplication table for a given number. The
program should:
Q6. Write a code that print the following pattern. Using for loop
**
***
****
*****
Q9. Write a C++ program that simulates a basic login system. The program should:
Q10.
You are tasked with creating a basic ATM system simulation that performs the following tasks:
Requirements: