Two-dimensional array: A two dimensional array is also called as a multi-dimensional array; a multidimensional array is that all the identical arrays are put together into a single array. This is useful for storing same type of multiple sets of data in same place. The main advantage is that one-dimensional array can hold only one set of value whereas two-dimensional array can hold multiple sets of data in the form of rows and columns. The structure of a multi-dimensional array is lookalike a table (that is combination of rows and columns); it contains same type of columns. Syntax: The syntax of two dimensional arrays is as follows: datatype array_name [number_of_rows][number_of_columns]; Analyzing the given array definition: Consider the given array definition: //Declare the two-dimensional array int numberArray[9][11]; The above code illustrates that the declaration of a two dimensional array named “numberArray” which holds “6” rows and “4” columns; so totally the array can hold “99” elements (that is 9 × 11 = 99 ). The index number representation for the “99” elements are as follows: C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 R1 (0,0) (0,1) (0,2) (0,3) (0,4) (0,5) (0,6) (0,7) (0,8) (0,9) (0,10) R2 (1,0) (1,1) (1,2) (1,3) (1,4) (1,5) (1,6) (1,7) (1,8) (1,9) (1,10) R3 (2,0) (2,1) (2,2) (2,3) (2,4) (2,5) (2,6) (2,7) (2,8) (2,9) (2,10) R4 (3,0) (3,1) (3,2) (3,3) (3,4) (3,5) (3,6) (3,7) (3,8) (3,9) (3,10) R5 (4,0) (4,1) (4,2) (4,3) (4,4) (4,5) (4,6) (4,7) (4,8) (4,9) (4,10) R6 (5,0) (5,1) (5,2) (5,3) (5,4) (5,5) (5,6) (5,7) (5,8) (5,9) (5,10) R7 (6,0) (6,1) (6,2) (6,3) (6,4) (6,5) (6,6) (6,7) (6,8) (6,9) (6,10) R8 (7,0) (7,1) (7,2) (7,3) (7,4) (7,5) (7,6) (7,7) (7,8) (7,9) (7,10) R9 (8,0) (8,1) (8,2) (8,3) (8,4) (8,5) (8,6) (8,7) (8,8) (8,9) (8,10) With the help of assignment operator “=”, the value can be easily assigned to an array.
Two-dimensional array: A two dimensional array is also called as a multi-dimensional array; a multidimensional array is that all the identical arrays are put together into a single array. This is useful for storing same type of multiple sets of data in same place. The main advantage is that one-dimensional array can hold only one set of value whereas two-dimensional array can hold multiple sets of data in the form of rows and columns. The structure of a multi-dimensional array is lookalike a table (that is combination of rows and columns); it contains same type of columns. Syntax: The syntax of two dimensional arrays is as follows: datatype array_name [number_of_rows][number_of_columns]; Analyzing the given array definition: Consider the given array definition: //Declare the two-dimensional array int numberArray[9][11]; The above code illustrates that the declaration of a two dimensional array named “numberArray” which holds “6” rows and “4” columns; so totally the array can hold “99” elements (that is 9 × 11 = 99 ). The index number representation for the “99” elements are as follows: C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 R1 (0,0) (0,1) (0,2) (0,3) (0,4) (0,5) (0,6) (0,7) (0,8) (0,9) (0,10) R2 (1,0) (1,1) (1,2) (1,3) (1,4) (1,5) (1,6) (1,7) (1,8) (1,9) (1,10) R3 (2,0) (2,1) (2,2) (2,3) (2,4) (2,5) (2,6) (2,7) (2,8) (2,9) (2,10) R4 (3,0) (3,1) (3,2) (3,3) (3,4) (3,5) (3,6) (3,7) (3,8) (3,9) (3,10) R5 (4,0) (4,1) (4,2) (4,3) (4,4) (4,5) (4,6) (4,7) (4,8) (4,9) (4,10) R6 (5,0) (5,1) (5,2) (5,3) (5,4) (5,5) (5,6) (5,7) (5,8) (5,9) (5,10) R7 (6,0) (6,1) (6,2) (6,3) (6,4) (6,5) (6,6) (6,7) (6,8) (6,9) (6,10) R8 (7,0) (7,1) (7,2) (7,3) (7,4) (7,5) (7,6) (7,7) (7,8) (7,9) (7,10) R9 (8,0) (8,1) (8,2) (8,3) (8,4) (8,5) (8,6) (8,7) (8,8) (8,9) (8,10) With the help of assignment operator “=”, the value can be easily assigned to an array.
A two dimensional array is also called as a multi-dimensional array; a multidimensional array is that all the identical arrays are put together into a single array.
This is useful for storing same type of multiple sets of data in same place.
The main advantage is that one-dimensional array can hold only one set of value whereas two-dimensional array can hold multiple sets of data in the form of rows and columns.
The structure of a multi-dimensional array is lookalike a table (that is combination of rows and columns); it contains same type of columns.
Syntax:
The syntax of two dimensional arrays is as follows:
The above code illustrates that the declaration of a two dimensional array named “numberArray” which holds “6” rows and “4” columns; so totally the array can hold “99” elements (that is
9×11=99).
The index number representation for the “99” elements are as follows:
C1
C2
C3
C4
C5
C6
C7
C8
C9
C10
C11
R1
(0,0)
(0,1)
(0,2)
(0,3)
(0,4)
(0,5)
(0,6)
(0,7)
(0,8)
(0,9)
(0,10)
R2
(1,0)
(1,1)
(1,2)
(1,3)
(1,4)
(1,5)
(1,6)
(1,7)
(1,8)
(1,9)
(1,10)
R3
(2,0)
(2,1)
(2,2)
(2,3)
(2,4)
(2,5)
(2,6)
(2,7)
(2,8)
(2,9)
(2,10)
R4
(3,0)
(3,1)
(3,2)
(3,3)
(3,4)
(3,5)
(3,6)
(3,7)
(3,8)
(3,9)
(3,10)
R5
(4,0)
(4,1)
(4,2)
(4,3)
(4,4)
(4,5)
(4,6)
(4,7)
(4,8)
(4,9)
(4,10)
R6
(5,0)
(5,1)
(5,2)
(5,3)
(5,4)
(5,5)
(5,6)
(5,7)
(5,8)
(5,9)
(5,10)
R7
(6,0)
(6,1)
(6,2)
(6,3)
(6,4)
(6,5)
(6,6)
(6,7)
(6,8)
(6,9)
(6,10)
R8
(7,0)
(7,1)
(7,2)
(7,3)
(7,4)
(7,5)
(7,6)
(7,7)
(7,8)
(7,9)
(7,10)
R9
(8,0)
(8,1)
(8,2)
(8,3)
(8,4)
(8,5)
(8,6)
(8,7)
(8,8)
(8,9)
(8,10)
With the help of assignment operator “=”, the value can be easily assigned to an array.
Unit 1 Assignment 1 – Loops and Methods (25 points)
Task:
You are working for Kean University and given the task of building an Email
Registration System. Your objective is to generate a Kean email ID and temporary
password for every new user. The system will prompt for user information and generate
corresponding credentials. You will develop a complete Java program that consists of
the following modules:
Instructions:
1. Main Method:
○ The main method should include a loop (of your choice) that asks for input
from five users.
For each user, you will prompt for their first name and last name and
generate the email and password by calling two separate methods.
Example
о Enter your first name: Joe
Enter your last name: Rowling
2.generateEmail() Method:
This method will take the user's first and last name as parameters and return the
corresponding Kean University email address.
The format of the email is:
•
First letter of the first name (lowercase) + Full last name (lowercase) +…
I have attached my code, under I want you to show me how to enhance it and make it more cooler and better in graphics with following the instructions.