Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Question Write a method called loadOutlets that will read the details of a fast food company's outlets from a text file, store these details

Java Question

image text in transcribed

Write a method called loadOutlets that will read the details of a fast food company's outlets from a text file, store these details in objects of the class Outlet and store each object of class Outlet in an ArrayList called outlets. You may assume that outlets has been declared elsewhere in the class containing the method loadOutlets and is visible inside loadOutlets and that all required Java packages have been imported. The class Outlet has a non-default constructor and takes all three of its attributes as parameters, they are: location, a String describing where the outlet is located. * phoneNumber, a String representing the phone number of he outlet . suburb, a String representing the suburb, other than the suburb it is located, to which the outlet makes deliveries The method loadOutlets takes the name of the text file as a parameter of type String and returns a boolean value to indicate whether the read operation has been a success The text file will store the outlets' data in the form (ie. 3 lines of data per outlet): Caulfield 98762345 Malverrn You must ensure the data read from the file does not exceed MAXIMUM NUMBER OF OUTLErS, which is a static constant declared in your program and visible inside loadoutlets

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

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions

Question

Discuss the role of change as part of organizational planning.

Answered: 1 week ago

Question

Did the team members feel that their work mattered

Answered: 1 week ago

Question

3. What may be the goal of the team?

Answered: 1 week ago