search

LEMON BLOG

Problem solving in C Programming with Pseudo Code

Few years back, i was given an assignment to write a Pseudo Code for a specific scenarios. I have written the code together with the diagram for illustration of the codes. Anyway, now i have decided to release my written assignment paper here as it may help any other students that is learning on this subject. Anyway, Pseudo code is a compact and informal high-level description of a computer programming algorithm that uses the structural conventions of some programming language, but it is intended for human reading rather than machine reading. 

PURPOSE
To master the problem solving phase in C programming.

REQUIREMENT / ASSIGNMENT QUESTION
Bunyan Lumber Company needs to create a table of the engineering properties of its lumber. The dimensions of the wood are measured as the base and the height in inches. Engineers need to know the following information about lumber:

Cross-Sectional Area=base×height
Moment of Inertia=(base ×〖height〗^3)/12
Section Modulus=(base×〖height〗^2)/6

The owner makes lumber with base sizes of 2, 4, 6, 8 and 10 inches. The height sizes are 2, 4, 6, 8, 10 and 12 inches. You are assigned to design a table with appropriate headings to show these values and the computed engineering properties. The first part of the table's outline is shown as:

Lumber Size Cross-Sectional Area Moment of Inertia Section Modulus
2 x 2
2 x 4
2 x 6
2 x 8
2 x 10
2 x 12
4 x 2
4 x 4
.
.

Based on the above programming problem:

1. Analyse the problem to identify required items to be used in designing algorithm
2. Write an algorithm in pseudo code
3. Draw a flowchart based on the pseudo code
4. Produce a tracing table to show the projected values

Note: You are not required to write programming codes for this assignment.

ASSIGNMENT QUESTION for COMPUTER PROGRAMMING I (SEPTEMBER 2014)

1. PROBLEM ANALYSIS

Q1 - Analyse the problem to identify required items to be used in designing algorithm.

Bunyan Lumber Company needs to create a table of the engineering properties of its lumber. The dimensions of the wood are measured as the base and the height in inches. The owner makes lumber with base sizes of 2, 4, 6, 8 and 10 inches. The height sizes are 2, 4, 6, 8, 10 and 12 inches. You are assigned to design a table with appropriate headings to show these values and the computed engineering properties.

The first step in solving a problem is to identify Input and Output problems. Therefore, in this situation the data requirement for this scenario are as per following:

Problem Input:

Height 
​Base
​(2, 4, 6, 8, 10 inches) ​(2, 4, 6, 8, 10, 12 inches)
Problem Output:

Basically, we need to design a table based on the input above to project these output:
1. Appropriate Table Headings
2. Lumber Size
3. Cross-Sectional Area
4. Moment of Inertia
5. Section of Modulus

Relevant Formula:

2. Write an algorithm in pseudo code.

Once the input and output problems has been identified together with relevant formula to produce the program, we can began on formulating the algorithm in pseudo code.

3. Draw a flowchart based on the pseudo code.

Refer below for the flow-chart representing the program's algorithm written previously.


4. Produce a tracing table to show the projected values.

Refer below for the projected values based on the above algorithm:

Prof Dr Mansor Fadzil, (2014), CBCP2101 Computer Programming I, Open University Malaysia.

References

Few years back, i was given an assignment paper for my studies on Basic Programming I. The assignment paper was about an in-depth discussion about how to write pseudo codes with diagrams. I i have decided to publish my written articles here after one year from the assignment date. This is due to avoid any plagiarism issues that i might encountered if i publish this earlier than that.

You may download the published assignment paper here.

3 Dos Games - Prince of Persia 1 & 2 and Digger
Android P might include iPhone X-style navigation ...
 

QUICK ACCESS

 Lemon Blog Articles

Lemon Web-Games

Lemon Web-Apps

 Lemon Web-TV

 Lemon Cloud System