Cpprog02 - Activity 1 (Bulos, Clarenze Ann T.)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

[CPPROG2 [INTRODUCTIO N TO JAVA PROGRAMMING]] ACTIVITIY #1

NAME: Bulos,Clarenze Ann T. DATE: 5/26/2021

SECTION: OLSA33A3 CAMPUS: SAN MATEO

INSTRUCTION/DIRECTION:

1. KINDLY DOWNLOAD THIS FILE PUT YOUR ANSWER UNDER THIS DOCUMENT.
2. FAILED TO FOLLOW INSTRUCTION WILL BE AUTOMATICALLY VOID/ZERO.
3. FILL UP ALL THE DETAILS ABOVE.

QUESTIONS:

1. GIVE THE STEP BY STEP PROCEDURE ON HOW TO USE NETBEANS SOFTWARE. (25PTS.)
2. WHAT ARE THE DIFFERENT KINDS OF COMMENTS. (25PTS.)
3. GIVE THE STRUCTURE OF THE PROGRAM. (25PTS.)
4. GIVE THE STEP BY STEP ON HOW TO RUN YOUR PROGRAM. (25PTS.)

Answers:

Question no. 1
1. Select File ⇾ New Project
2. In the New Project window, select the Java category, and choose Java Application,
then Next.
3. Choose the project name HelloWorld. The other settings have default values which
you probably want to use. The project location cannot be an existing directory.
NetBeans also pre-checks the box Create Main Class. Leave it checked.
Click Finish.
4. In the left-hand window there you can observe three views of the netbeans
contents: Projects, Files, Services. For the most part you can work from
the Projects view. In the Projects window you will see the file HelloWorld.java as
part of the automatically-created helloworld package.
5. Go to the Files view and observe the structure which NetBeans creates.
The src folder is meant to hold all the source packages. The HelloWorld.java file is
in a package directory HelloWorld within the src folder.
6. Within the public static void main function, type
[CPPROG2 [INTRODUCTIO N TO JAVA PROGRAMMING]] ACTIVITIY #1
System.out.println("Hello World");
Observe the various syntactic assistsDATE
NAME: which
: the editor offers when you pause after
typing
SECTION: a ".". CAMPUS:
7. Select File ⇾ Save (or Ctrl-S) to save.
8. There are several ways to compile and run this application. One way is to right-
click on HelloWorld.java and select Run File from the popup menu. Look for the
output in the Output window at the bottom.
9. Another way to build and run the project is by selecting Run ⇾ Cean and Build
Project or Shift+F11. This operation goes a step further and archives the compiled
classes into the jar file HelloWorld.jar found in the newly created dist directory.
Afterwards, select Run ⇾ Run Project or F6, or the
INSTRUCTION/DIRECTION: button

1. KINDLY DOWNLOAD THIS FILE PUT YOUR ANSWER UNDER THIS DOCUMENT.
2. FAILED TO FOLLOW INSTRUCTION WILL BE AUTOMATICALLY VOID/ZERO.
Question
3. FILLno. 2 THE DETAILS ABOVE.
UP ALL

 Single – line comments.


 Multi – line comments.
QUESTIONS:
 Documentation comments.
1. GIVE THE STEP BY STEP PROCEDURE ON HOW TO USE NETBEANS SOFTWARE. (25PTS.)
2. WHAT ARE THE DIFFERENT KINDS OF COMMENTS. (25PTS.)
Question
3. GIVEno.
THE 3
STRUCTURE OF THE PROGRAM. (25PTS.)
4. GIVE THE STEP BY STEP ON HOW TO RUN YOUR PROGRAM. (25PTS.)
1. Documentation Section.
2. Package Declaration.
3. Import Statements.
4. Interface Section.
5. Class Definition.
6. Class Variables and Variables.
7. Main Method Class.
8. Methods and Behaviors.
9.

Question no. 4

1. Select File ⇾ Save (or Ctrl-S) to save.


2. There are several ways to compile and run this application. One way is to right-
click on HelloWorld.java and select Run File from the popup menu. Look for the
output in the Output window at the bottom.
3. Another way to build and run the project is by selecting Run ⇾ Cean and Build
Project or Shift+F11. This operation goes a step further and archives the compiled
classes into the jar file HelloWorld.jar found in the newly created dist directory.
Afterwards, select Run ⇾ Run Project or F6, or the button

You might also like