Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this lab, you are introduced to two-dimensional arrays. You are provided with the class Person, and five one-dimensional arrays of Person, and required
In this lab, you are introduced to two-dimensional arrays. You are provided with the class Person, and five one-dimensional arrays of Person, and required to combine them into a two-dimensional array. The data represents a list of appointments for five days of the week. Each array contains the people scheduled for one day's appointment. Follow the directions exactly, and in order. Task #1 Find an element of a 1D array 1. Using the existing ID array called tuesdayAppts, find Person p7. 2. Set intToPrint as the ID of Person p7, using tuesdayAppts and the accessor found in the file Person.java. Do not access p7 directly. 3. Set fNameToPrint and IName ToPrint of Person p7. 4. Run the program to see the result. Task #2 Create a 2D Array 1. Declare a 2D array called weeklyAppts 2. Instantiate weekly Appts using the five daily appointment ID arrays. Task #3 Find an element of a 2D array 1. Using the 2D array called weeklyAppts, find Person #8 (p8). 2. Set intToPrint as the ID of Person p8, using weekly Appts. 3. Set fNameToPrint and INameToPrint of Person p8. 4. Run the program to see the result. Task #4 Find the length of a 1D array in a 2D array 1. Using weeklyAppts, set intToPrint to the length of thursdayAppts 2. Run the program to see the result.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started