Data structures & algorithms

Write a program named MultiD-AList that satisfies the attached requirements.

CPSC-4355

Don't use plagiarized sources. Get Your Custom Essay on
Data structures & algorithms
Just from \$13/Page

ArrayList Assignment

Just as the elements of an array can be defined to be arrays themselves (thus making

multidimensional arrays), so can an ArrayList be defined to contain elements that are

themselves an ArrayList (thus making multidimensional ArrayLists).

1. Define a multidimensional ArrayList named seats to hold the status (available,

taken) of seats in a theatre.

a. There are three dimensions

i. The seating levels (main floor, 1st balcony, 2nd balcony).

ii. The rows on a given level.

iii. The seats in a given row.

iv. Define seats as an ArrayList of levels where each level is an ArrayList

of rows and each row is an ArrayList of seats (thus the 3 dimensions).

b. Since the status can only be two values, the data type is Boolean.

2. Initialize the ArrayList so that all seats are taken except the first seat of each row.

a. True = seat is taken; false = seat is available

3. Display the ArrayList by seating level on screen.

4. Store the ArrayList by seating level to a file using PrintStream (recall from section

6.4 in book).

CPSC-4355
ArrayList Assignment

NOTE that the new command syntax allows the right side to get the data type from the left side of the

statement without repeating it:

ArrayList variableName = new ArrayList<>();

NOTE that since the ArrayList does not have predetermined sizes, the dimensions for the seating layout

must be stored someplace. Use the following 2-dimensional array to hold the rows and seats for each

seating level of the theatre.

int [][] seatsLayout = {{4,5}, // rows and seats on the main floor

{3,4}, // rows and seats on the 1st balcony

{1,3}}; // rows and seats on the 2nd balcony

Output to the screen and file should look as follows:

[[false, true, true, true, true], [false, true, true, true, true], [false, true, true, true, true], [false, true,

true, true, true]]

[[false, true, true, true], [false, true, true, true], [false, true, true, true]]

[[false, true, true]]

What Will You Get?

We provide professional writing services to help you score straight A’s by submitting custom written assignments that mirror your guidelines.

Get result-oriented writing and never worry about grades anymore. We follow the highest quality standards to make sure that you get perfect assignments.

Experienced Writers

Our writers have experience in dealing with papers of every educational level. You can surely rely on the expertise of our qualified professionals.

On-Time Delivery

Someone from our customer support team is always here to respond to your questions. So, hit us up if you have got any ambiguity or concern.

Complete Confidentiality

Sit back and relax while we help you out with writing your papers. We have an ultimate policy for keeping your personal and order-related details a secret.

Authentic Sources

We assure you that your document will be thoroughly checked for plagiarism and grammatical errors as we use highly authentic and licit sources.

Moneyback Guarantee

Still reluctant about placing an order? Our 100% Moneyback Guarantee backs you up on rare occasions where you aren’t satisfied with the writing.

Order Tracking

You don’t have to wait for an update for hours; you can track the progress of your order any time you want. We share the status after each step.

Areas of Expertise

Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.

Trusted Partner of 9650+ Students for Writing

From brainstorming your paper's outline to perfecting its grammar, we perform every step carefully to make your paper worthy of A grade.

Preferred Writer

Hire your preferred writer anytime. Simply specify if you want your preferred expert to write your paper and we’ll make that happen.

Grammar Check Report

Get an elaborate and authentic grammar check report with your work to have the grammar goodness sealed in your document.

One Page Summary

You can purchase this feature if you want our writers to sum up your paper in the form of a concise and well-articulated summary.

Plagiarism Report

You don’t have to worry about plagiarism anymore. Get a plagiarism report to certify the uniqueness of your work.

Free Features \$66FREE

• Most Qualified Writer \$10FREE
• Plagiarism Scan Report \$10FREE
• Unlimited Revisions \$08FREE
• Paper Formatting \$05FREE
• Cover Page \$05FREE
• Referencing & Bibliography \$10FREE
• Dedicated User Area \$08FREE

Our Services

• On-time Delivery

We create perfect papers according to the guidelines.

Professional Editing

We seamlessly edit out errors from your papers.

Work with ultimate peace of mind because we ensure that your academic work is our responsibility and your grades are a top concern for us!

Check Out Our Sample Work

Dedication. Quality. Commitment. Punctuality

Categories
All samples
Essay (any type)
Essay (any type)
The Value of a Nursing Degree
Nursing
2

It May Not Be Much, but It’s Honest Work!

Here is what we have achieved so far. These numbers are evidence that we go the extra mile to make your college journey successful.

Process as Fine as Brewed Coffee

We have the most intuitive and minimalistic process so that you can easily place an order. Just follow a few steps to unlock success.

See How We Helped 9000+ Students Achieve Success

We Analyze Your Problem and Offer Customized Writing

We understand your guidelines first before delivering any writing service. You can discuss your writing needs and we will have them evaluated by our dedicated team.

• Clear elicitation of your requirements.
• Customized writing as per your needs.

We Mirror Your Guidelines to Deliver Quality Services

We write your papers in a standardized way. We complete your work in such a way that it turns out to be a perfect description of your guidelines.

• Proactive analysis of your writing.
• Active communication to understand requirements.