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

Java Arrays: User Info & Grades

The document outlines an activity for creating paired arrays to store user information, including name, age, breathing style, rank, and gender. It provides an example of how to output this information using an index variable. Additionally, it describes a program to display grades for multiple students across different subjects using arrays.

Uploaded by

j1h30n3y
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)
5 views5 pages

Java Arrays: User Info & Grades

The document outlines an activity for creating paired arrays to store user information, including name, age, breathing style, rank, and gender. It provides an example of how to output this information using an index variable. Additionally, it describes a program to display grades for multiple students across different subjects using arrays.

Uploaded by

j1h30n3y
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

Activity
Array Elements and Index
Paired Array by Index
Activity for Array Elements and Index
Create 3 arrays that will hold 5 user’s information

Example:
1) Name 4) Breathing Style
2) Age 5) Gender
3) Rank

For Example: Name[0], Age[0] and Rank[0] Should


belong to the same user.
Paired Array by Index
Activity for Array Elements and Index
We will output the user’s information by using an int variable as an
index
Sample Output:
Enter the index of the Demon Slayer Information 2
Name : Kyojiro
Age : 28
Breathing Style : Flame Breathing
Rank : Hashira
Gender : Male
Enter Student name #1: Yuji Sample
Student Enter Student name #2: Gojo
Enter Student #1 Grade in English: 77
Enter Student #2 Grade in English: 76
Output:

Grades Enter Student #1 Grade in Math: 81


Enter Student #2 Grade in Math: 82
Enter Student #1 Grade in Computer Programming: 97
Enter Student #2 Grade in Computer Programming: 98
Activity for Array ______________________________________
Name | English | Math | ComProg |
Elements and Index _________________________________
Yuji | 77.0 | 81.0 | 97.0 |
Create a Program that _________________________________
Gojo | 76.0 | 82.0 | 77.0 |
display the 5 students
_________________________________
using Array and their Maki | 77.0 | 77.0 | 77.0 |
grades ----------Grading Sheet-----------
Thank You!
The End

You might also like