0% found this document useful (0 votes)
41 views

Labtask Oop

The document provides instructions for a lab task on object oriented programming in Java. Students are asked to write a program to calculate basal metabolic rate (BMR) based on user input for gender, weight, height and age. The program should use branching statements to select the correct BMR formula for male or female. It should also allow the user to continuously calculate new BMR values by looping the input steps. The submission will be marked based on criteria like coding standard, use of techniques, execution and output.

Uploaded by

cupcakerynn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Labtask Oop

The document provides instructions for a lab task on object oriented programming in Java. Students are asked to write a program to calculate basal metabolic rate (BMR) based on user input for gender, weight, height and age. The program should use branching statements to select the correct BMR formula for male or female. It should also allow the user to continuously calculate new BMR values by looping the input steps. The submission will be marked based on criteria like coding standard, use of techniques, execution and output.

Uploaded by

cupcakerynn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

POLYTECHNIC SULTAN MIZAN ZAINAL ABIDIN

DEPARTMENT OF INFORMATION AND COMMUNICATION TECHNOLOGY

DFP30243
OBJECT ORIENTED PROGRAMMING

TOPIC CHAPTER 3
ASSESMENT LABORATORY TASK 1
NAME NUR ARIESYA SYAFIKA BINTI ABDULLAH
REG NO 13DDT22F1176
PROGRAMME DDT3S2

INSTRUCTIONS :

1. Answer ALL the questions


2. Submit the assessment on

MARKING SCHEME
CLO 1 PLO 3 /20
TOTAL / 20

THE ENTIRE QUESTION IS BASED ON JTMK’S QUESTION BANK APPROVED BY PROGRAMME LEADER.
SIGNATURE IS NOT REQUIRED.
CHAPTER 3 : CLASSES AND OBJECTS [CLO 1][PLO 3]

Learning outcomes:

By the end of this lab, students should be able to:

 declare, initialize and use variables.


 use operator to modify values.
 Use branching statement in program.

Question 1 (BMR Calculator)

1. Basal Metabolic Rate (BMR) is the number of calories burn as body performs basic (basal) life-
sustaining function. Which are the calories burned if you stayed in bed all day. BMR can be
determine using mathematical formula.

Gender Formula

Female 655 + (9.6 × weight in kg) + (1.8 × height in cm) – (4.7 × age in years)

Male 66 + (13.7 × weight in kg) + (5 × height in cm) – (6.8 × age in years)

2. Write a Java Program to input choice (female or male), weight, height, and age from user. Use
data and method in program
3. Use branching statement to make the selection between male or male BMR calculation.

4. Loop step 2 if user wants to continue based on input given.


CODING :
OUTPUT:
DFP30243 – OBJECT ORIENTED PROGRAMMING

LAB TASK 1 (20 MARKS)

STANDARD WEIGHTAGE SCORE


CRITERIA Superior Excellent Good Poor MARK (w) ((s/4) x w
4 3 2 1 (s) )
Coding Standard Code is well Code is Code is organized, Code is 3
organized, well organized, contain some disorganized,
written almost complete comments,inconsistent no comments, no
comments, comments, indentation. indentation.
proper inconsistent
indentation. indentation.

Technique: The program The program The program uses The program 5
- Data uses complete uses incomplete incomplete data, uses incomplete
- Method data, method, & data, method, & method, & operator data, method, &
- operator operator. operator. with minor error. operator with
major error.

Technique: The program The program The program uses The program 5
 branching uses complete uses incomplete incomplete branching uses incomplete
statement branching branching statement with minor branching
statement. statement. error. statement with
major error.

Technique: The program The program The program uses The program 3
- main uses complete uses incomplete incomplete main uses incomplete
method main method. main method. method with minor main method
error. with major error.
Execution and Executes without Executes without Executes with some Does not execute 4
Output errors and the errors and the errors and the due to errors
program program program does not and the program
produces produces produces output does not
correct output. incorrect output produces output

TOTAL (2O MARKS)

You might also like