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

Tutorial 1

Uploaded by

Lạc Dương
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Tutorial 1

Uploaded by

Lạc Dương
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Programming 1

Tutorial 1
Activity 1

Task
Install Notepad++, IntelliJ IDEA and AdoptOpenJDK Hotspot 17

Add JDK to Path environment variable.

Test javac command.

Activity 2

Task
HelloWorld is the program which prints out the text “Hello, world!”. Write,
compile and run the HelloWorld program using Notepad++ and CMD only.

Activity 3

Task
Repeat the previous activity using IntelliJ IDEA.
Activity 4

Task

Write a program in which you declare 2 variables to store your weight (in
kilograms) and your height (in meters), then show your BMI value. The Body
Mass Index can be calculated as follows:

weight
BMI = 2
height
FYI, normal BMI value ranges from 18.5 to 25 kg/m2.

Expected result:
My weight: 51.0 (kg)

My height: 1.63 (m)

My BMI: 19.195302796492154 (kg/m2)

Instructions:
- Choose the suitable data types for your variables.

- Pay attention to the priority of calculation in your formula.

- Use 3 println statements for 3 lines of the program output.

You might also like