0% found this document useful (0 votes)
4 views5 pages

Java Star Pattern Test With Sample Output

The document outlines a practical test for Java programming focused on creating star pattern programs using loops. It includes 15 specific pattern questions, each requiring separate Java programs, and emphasizes proper indentation and formatting. Evaluation criteria are provided, detailing how marks will be allocated based on logic correctness, loop usage, code structure, and input handling.

Uploaded by

shinigami.02506
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)
4 views5 pages

Java Star Pattern Test With Sample Output

The document outlines a practical test for Java programming focused on creating star pattern programs using loops. It includes 15 specific pattern questions, each requiring separate Java programs, and emphasizes proper indentation and formatting. Evaluation criteria are provided, detailing how marks will be allocated based on logic correctness, loop usage, code structure, and input handling.

Uploaded by

shinigami.02506
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

JAVA PROGRAMMING PRACTICAL TEST

Star Pattern Programs (15 Questions with Sample Output)

Student Name: ________________________________


Roll No: ________________________________
Class/Section: ________________________________

Instructions:
• Write separate Java programs for each question.
• Use loops only (for / while / do-while).
• Take input 'n' from the user wherever required.
• Maintain proper indentation and formatting.

Q1. Right Triangle

*
**
***
****
*****

Q2. Inverted Right Triangle

*****
****
***
**
*

Q3. Right Triangle (n=4)

*
**
***
****

Q4. 5x5 Square


*****
*****
*****
*****
*****

Q5. Increasing Space Pattern

*
*
*
*
*

Q6. Pyramid

*
***
*****
*******
*********

Q7. Inverted Pyramid

*********
*******
*****
***
*

Q8. Hollow Square

*****
* *
* *
* *
*****

Q9. Hollow Triangle

*
**
* *
* *
*****
Q10. Diamond

*
***
*****
*******
*********
*******
*****
***
*

Q11. Floyd’s Triangle (Stars)

*
* *
* * *
* * * *
* * * * *

Q12. Right Side Inverted

*****
****
***
**
*

Q13. Butterfly

* *
** **
*** ***
********
********
*** ***
** **
* *

Q14. Hollow Diamond

*
* *
* *
* *
* *
* *
*
Q15. Sandglass

*********
*******
*****
***
*
***
*****
*******
*********
Evaluation Criteria:

Criteria Marks
Logic Correctness 12
Loop Usage & Nesting 8
Code Structure & Readability 5
Input Handling 5
Total 30

You might also like