SSK1102 2023/2024-1
UNIVERSITI PUTRA MALAYSIA
FACULTY OF HUMANITIES, MANAGEMENT AND SCIENCE
LAB 4 – Individual
LAB OBJECTIVE:
The main objective for this lab is to understand how to translate an algorithm (flow chart or
pseudo code) into Java Programming.
DURATION:
1 week / 3 hours
INTRODUCTION:
Basically before a program is written, a programmer will have an algorithm (whether in a
form of flow chart or pseudo code) to refer to. Algorithm is a guide to programmer to develop
a program, software or system.
LAB ACTIVITIES:
1. Translate flow-chart into coding Java
LAB QUESTION:
1. Study this program and create flow-chart based on this program.
Coding:
Output:
2. Rewrite the program in Listing 2.8, ComputeLoan.java, to read from input dialog
boxes rather than from the console. Figure 2.5 shows a sample run of the program.