0% found this document useful (0 votes)
25 views2 pages

Java Programming Basics Tutorial

The document outlines a programming tutorial consisting of four activities. The tasks include installing software, writing and running a 'HelloWorld' program, and calculating BMI using user-defined variables. It emphasizes using Notepad++, CMD, and IntelliJ IDEA for coding and provides specific instructions for variable declaration and output formatting.

Uploaded by

Lạc Dương
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)
25 views2 pages

Java Programming Basics Tutorial

The document outlines a programming tutorial consisting of four activities. The tasks include installing software, writing and running a 'HelloWorld' program, and calculating BMI using user-defined variables. It emphasizes using Notepad++, CMD, and IntelliJ IDEA for coding and provides specific instructions for variable declaration and output formatting.

Uploaded by

Lạc Dương
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

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