You are on page 1of 4

(Approved by UAC)

UNIVERSITI KUALA LUMPUR


ASSESSMENT BRIEF SAMPLE

COURSE DETAILS
CAMPUS MALAYSIAN INSTITUTE OF INFORMATION TECHNOLOGY
COURSE NAME FUNDAMENTAL OF PROGRAMMING
COURSE CODE ITD10103
COURSE LEADER ZAILATUL SYEEMA MAHADI
YEAR/SEMESTER YEAR 1/ SEM 2
ASSESSMENT DETAILS
TITLE/NAME CLASS EXERCISE 1
WEIGHT 0%
DATE/DEADLINE NIL
COURSE CLO 1
OUTCOME(S) Understand basic fundamentals of programming such as elementary
programming and programming techniques

INSTRUCTIONS 1. Complete all the tasks given

DELIVERABLES 1. Analysis table


2. Pseudocode/flowchart
3. Java program
4. Desk checking

Exercise1Q1 - Temperature.java Celsius to Fahrenheit


Write a program to converts and display a temperature given in Celsius to Fahrenheit
Fahrenheit = 1.8 * Celsius + 32
1. ANALYSIS TABLE:

Input Process Output


Celsius Prompt Celsius Fahrenheit
Get Celsius
Calculate
Fahrenheit = 1,8 * Celsius + 32
Display Fahrenheit

2. PSEUDOCODE:

Calculate_Fahrenheit
1 Prompt Celsius
2 Get Celsius
3 Calculate Fahrenheit = 1.8 * Celsius + 32
4 Display Fahrenheit
END
(Approved by UAC)

3. FLOWCHART

4. JAVA PROGRAMMING

5. DESK CHECKING
(Approved by UAC)

Variable

Sample Data

Exercise1Q2 - Cylinder.java Calculate cylinder volume

A program is required to calculate a volume of a cylinder. By referring to the figure below, prompt user to
enter base radius and height of the cylinder. Calculate and display the volume with the following formula:

radius

height

Cylinder’s volume = 3.142 * radius * radius * height

Input Process Output

LabExercise1Q3 – CarRental.java Car Rental


Create an application for a local car rental agency that calculates rental charges. The agency charges
RM15 per day plus RM0.12 per mile.
Prompt the user to enter beginning and ending odometer reading. Also let the user enter number of days
the car was used.
Display the miles driven and the total charge
(Approved by UAC)

Input Process Output

LabExercise1Q4 – BMI.java Body Mass Index


A quantity known as the body mass index (BMI) is used to calculate the risk of weight-related health
problems. BMI is computed by the formula
BMI = w / (h)2
where w is weight in kilograms and h is height in meters. Write a program that received input from
user and display the BMI

Input Process Output

LabExercise1Q5 – CandyBar.java Candy Bar


Write a program that computes the amount of money the computer club will receive from the proceeds of
their candy sales project. Prompt user to enter number of candy bars. The candy was sold RM0.75 per
bar.
The club are required to give the student government association 10% of their earnings. Display their net
profit.

Input Process Output

LabExercise1Q6 – Salary.java Salary


Prompt the part time worker in McDonalds to enter hour work. Write a program to calculate and display
the total salary (for one day) for a part time worker if the worker is paid RM4.70 per hour.

Input Process Output

LabExercise1Q7 – SemesterFees.java Semester fees


Prompts a student for the number of credit hours in which the student is enrolled, and the amount of
money spent on books. Display, with a full explanation, the student’s total fees. The total is RM250 per
credit hour, plus the amount for books, plus a RM65 athletic fees

Input Process Output

You might also like