Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed




















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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

App Inventor

Authors: David Wolber, Hal Abelson

1st Edition

1449397484, 9781449397487

More Books

Students also viewed these Programming questions

Question

Simplify each expression. 2(m + p)

Answered: 1 week ago