### Ask Your question

### Search & Filtering

A program that will calculate the velocity of a rocket using algorithm, pseudocode and flowchart

The mainline logic of almost every procedural problem consists of three parts namely housekeeping tasks, detail loop tasks and end-of-job tasks. By making use of flowcharts, show how these parts can be implemented in your solution for question 2.1

Question 2 (Marks: 50)

The system to be developed for Williams and Son needs to produce the following slip for a

customer once the sale has been concluded.

Please note: For the purpose of this assignment, assume that a customer will only purchase one

unit of each item.

Q.2.1 Write the pseudocode that will produce a slip similar to the one illustrated at

the beginning of the question. Your solution should satisfy the following

requirements:

The solution must illustrate the use of good programming practices;

The solution must make use of a loop;

The loop must make use of a sentinel value.

(22)

Q.2.2 The mainline logic of almost every procedural program consists of three parts

namely housekeeping tasks, detail loop tasks and end-of-job tasks. By making

use of flowcharts, show how these parts can be implemented in your solution

for Question 2.1.

(23)

The system to be developed for Williams and Son needs to produce the following slip for a

customer once the sale has been concluded.

Please note: For the purpose of this assignment, assume that a customer will only purchase one

unit of each item.

Q.2.1 Write the pseudocode that will produce a slip similar to the one illustrated at

the beginning of the question. Your solution should satisfy the following

requirements:

The solution must illustrate the use of good programming practices;

The solution must make use of a loop;

The loop must make use of a sentinel value.

(22)

Q.2.2 The mainline logic of almost every procedural program consists of three parts

namely housekeeping tasks, detail loop tasks and end-of-job tasks. By making

use of flowcharts, show how these parts can be implemented in your solution

for Question 2.1.

(23)

The mainline logic of almost every procedural program consists of three parts

namely housekeeping tasks, detail loop tasks and end-of-job tasks. By making

use of flowcharts, show how these parts can be implemented in your solution

for Question 2.1.

namely housekeeping tasks, detail loop tasks and end-of-job tasks. By making

use of flowcharts, show how these parts can be implemented in your solution

for Question 2.1.

draw a flow diagram for an algorithm which calculates how much money a student will need per week to buy a meal and two drinks each weekday. The user should be prompted to enter how much a meal costs, how much a drink costs, and then calculate and display the total required

Draw a flow diagram for an algorithm which calculates how many numbers 1,2,3...n have to be added to reach a total greater than 500. Output the answer n

Write the pseudocode that will produce a slip similar to the one illustrated at

the beginning of the question

Williams & Son

VAT nr: 0123456

Product Price

Screwdriver R 100

Super glue R 20

_______________________

Total: R120

the beginning of the question

Williams & Son

VAT nr: 0123456

Product Price

Screwdriver R 100

Super glue R 20

_______________________

Total: R120

Flowchart for printing a name for 10 times

Multiply the following two matrices using Strassen’s algorithm. Do it manually, that is, using paper and pencil by hand. Show clearly all the intermediate steps.

A = 3 2 1 0

5 6 2 7

7 6 5 2

1 2 3 5

B= 5 6 7 1

1 3 2 0

5 6 7 1

2 3 9 0

A = 3 2 1 0

5 6 2 7

7 6 5 2

1 2 3 5

B= 5 6 7 1

1 3 2 0

5 6 7 1

2 3 9 0

Implement quicksort using by choosing the following two ways of picking the pivot:

a. Randomly

b. Median-of-3

Now find out which implementation is running faster by sorting a huge size (10 million integers) array. Fill this array with random numbers and then sort it using both above schemes.

a. Randomly

b. Median-of-3

Now find out which implementation is running faster by sorting a huge size (10 million integers) array. Fill this array with random numbers and then sort it using both above schemes.