Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Week 5 - Laboratory Activity 1

Name: _Macalintal, Alexandre Jedric S.______________ Score:


Student Number: __202110299________ Date: __23/02/2024_________
Section/Schedule _29068- 1030-1330 Wed_______ ______
30
Subject: Object Oriented Programming Lab Professor:_Mr. Archie G. Santiago_

Objectives:
a. Design and perform correct usage of a Java programming constructs using Conditional
Statements and using JOptionPane Class for the User Input.

A. Using Conditional Statement

Problem: Create a Java Application that will let the user enter two numbers (positive or negative
integer value) that will represent the x-coordinate and y-coordinate of a point in a
Cartesian Plane. Then determine if the inputted coordinates of a point belong to Quadrant
I, Quadrant II, Quadrant III, or Quadrant IV. Refer to the figure below (Cartesian Plane).
Note: If the Coordinates are 0,0 display the Remark : “Point of Origin”.

• Point(3,2)
Point(3,2) is in
Quadrant 1.

Directions:

Step 1. Open your NetBeans IDE.

Step 2. Write the intended program for the problem. Note: use Conditional Statements.

Step 3. Save your program using the written Class Name as the File Name and with the File
Extension name – .java.

Step 4. Compile and Run your Java Application.


Step 5. Provide the following:

a. Source Code Listing. (10 points)

b. Screenshots of the Final Output (at least three, including the Point of Origin) (15
points)
c. Selfie with the Final Output (5 points)

You might also like