Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Week 5 Practice Program - Pizza File/IO Class in this week's practice program, we are stepping up our game a bit and we are going

Week 5 Practice Program - Pizza File/IO

Class in this week's practice program, we are "stepping up our game" a bit and we are going to begin seeing a more complex, but more "real world" object oriented program structure. The good news is that for the Pizza Practice program you are not going to start from scratch, and everything you are being asked to do in this program is demonstrated in the example Circle program. Also, keep in mind that the Week 5, 6, and Course project assignments will be requiring you to do perform these programming techniques. So, let's practice some of the techniques.

Start by downloading the attached "Week5_Pizza_FileIO_Shell.zip" program, unzip the program and open it up into Netbean. Then before you start, make sure add the Helpers project to the file (this program would take a week to build without the helpers). The shell project will compile and execute, and even read a stream file and populate the list with data from a string file.

Click to download the Pizza Program File IO Shell Project

You are then asked to complete the following features:

Add a PizzaList class that:

An private array list that will hold the stock objects.

Public methods that:

Add an object to the list

Remove an object from the list

Interacts with the given FileIO_Streams object to save the list as strings.

Interacts with the given FileIO_Streams object to retrieve the list as strings

Interacts with the FileIO_Objects object to to save the list as objects

Interacts with the FileIO_Objects object to retreive the list as objects

A method to calculate the total value of all the orders.

FileIO_Streams Class

You can use the provided FileIO_Streams class as is, and you will want to integrate the operations into the PizzaList class.

FileIO_Object Class

Use the provided FileIO_Object class, which is not fully implemented, and add the following public methods:

writeData that accepts an ArrayList of PizzaOrders and writes the objects to the given file and returns the number of records written to the file

readData that returns an ArrayList of PizzaOrders that are read from the given file.

Graphical User Interface

Update the given graphical user interface to:

Save the list in the Order list to a file using both types of file I/O (streams and objects).

Retrieve the list from either the string stream or the object stream and populate the list.

Add a menu item tothe Order Summary menu to update the total (just replicate Update Total Button)

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

More Books

Students also viewed these Databases questions

Question

Question How are IRAs treated for state tax law purposes?

Answered: 1 week ago