0% found this document useful (0 votes)
54 views3 pages

LAB 3 - Through The Loops

This document provides instructions for a laboratory activity on using loops in Java. Students are given problems to solve using while, for, and do-while loops and display output. They must submit solutions, flowcharts, and conclusions for grading according to a rubric.

Uploaded by

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

LAB 3 - Through The Loops

This document provides instructions for a laboratory activity on using loops in Java. Students are given problems to solve using while, for, and do-while loops and display output. They must submit solutions, flowcharts, and conclusions for grading according to a rubric.

Uploaded by

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

DCIT 22 – Laboratory Activity 03

Republic of the Philippines


CAVITE STATE UNIVERSITY
Bacoor City Campus
SHIV, Molino VI, City of Bacoor

DEPARTMENT OF COMPUTER STUDIES


Bachelor of Science in Computer Science

DCIT 22: COMPUTER PROGRAMMING 1


(FUNDAMENTALS OF PROGRAMMING) - LABORATORY

LABORATORY 3: THROUGH THE LOOPS (GROUP)

In this activity, you will be given a series of problems that will challenge your logical
understanding of Java covered by the discussion, and not. For each problem, you are expected
to create a project and write a working solution depending on the requirements of the problem.

Always keep in mind, think outside the box.

INTENDED LEARNING OUTCOMES

At the end of this activity, the students are expected to be able to:

1. discuss the implications of the given problems;


2. use the WHILE, FOR and DO-WHILE statement accordingly; and
3. use the appropriate operators for the program requirements

MATERIAL/S AND SOFTWARE NEEDED

➢ Java IDE (Netbeans, Eclipse or any available that can be use also through
smartphones)

PROCEDURE

1. Choose a partner or companion. Most of the activities will be pair programming.

2. On the top left portion of each paper or page, write down the following:
DCIT 22 Laboratory Exercise 0<XX>
<Last Name>, <First Name> | “I can do this!”
<Course, Year & Section>
<Date>

3. Make sure you have a running version of the “Hello World” application shown last
synchronous session. If not, review the steps to setup your Work Environment.

4. There will be a series of problems you are required to code. For each, you need to provide
Java codes for the actual solution.

5. Keep the project files for record as they may be requested by the instructor.

6. On a new page following your solution, write its equivalent using flowchart and
pseudocodes / algorithm.

7. Keep your written answers secured until you complete the course. Should they be
requested, present them accordingly. Should you fail to do so, you will automatically receive
zero (0) mark.

8. Submit a copy of your output invidivually in our Google Classroom corresponding to the
post of this Laboratory Activity.

QUESTIONS

1. Write a program using WHILE statement that displays


a right triangle using asterisks where the height is at
the left corner of the application. The height will
depend on the user input.

2. Write a program using FOR statement that displays a


right triangle using asterisks where the height is at the
right corner of the application.The height will depend
on the user input..

3. Write a program using DO WHILE statement that


displays an inverted equilateral triangle using
asterisks. No asterisk should be adjacent to one
another. The height will depend on the user input.

[Hint]
You can use an IF
statement to eliminate
the initial space for the
first row.

4. What can you conclude from this activity


INSTRUCTIONS FOR THE STUDENTS

The filename of your lab activity should be:


“<Last Name><First Name>-LaboratoryExercise0<XX>”

Save your work in Word format (.doc or .docx) and convert it into a pdf file.

Don’t forget to screenshot you working code capturing also the Java IDE used and also the five
(3) sample outputs.

Question 1, 2 & 3 must have individual rubrics. Insert the rubric before your solution.

Upload your file to the link provided for the activity in the Google Classroom.

Text should be visible and readable so use the standard format, font style: Arial and size: 11.

RUBRICS FOR GRADING

Create a row and column for “SCORE” on the right side and “TOTAL SCORE” on the bottom.

You might also like