Question: Using Netbeans Java IDE Using Netbeans, Include the TextIO.java file. Also make sure that you copy the icecream.dat file into your project directory so that

Using Netbeans Java IDE

Using Netbeans, Include the TextIO.java file. Also make sure that you copy the icecream.dat file into your project directory so that it can be found by your java program.

You must develop a program that reads the file icecream.dat. (see below)

You must use TextIO methods to read the file. As you read the file, count the total number of ice cream cones that were sold. (This is the same as the number of lines that you read from the file.) Also count the total number of "Strawberry" cones that were sold.

At the end of the program, print out the total number of cones, the number of Strawberry cones, and the percentage of cones that were Strawberry.

Note: To do this program, you have to know when to stop reading from the file. TextIO has a function named TextIO.eof() to check whether the entire file has been read. The value of this function is true if the entire file has been read. The value is false if there is more data in the file. You want to continue reading from the file as long as TextIO.eof() is false.

Note: Suppose that flavor is a variable of type String and you want to test whether its value is "Strawberry". To do this, test whether flavor.equals("Strawberry"). (Do not use == to test for equality of Strings.)

Each line of the file icecream.dat is an ice cream flavor such as "Vanilla" or "Strawberry." A line represents the sale of one ice cream cone of the given flavor.

Chocolate

Mint

Vanilla

Strawberry

Chocolate

Vanilla

Fudge Ripple

Strawberry

Chocolate

Chocolate

Vanilla

Vanilla

Peanut Butter

Vanilla

Chocolate

Strawberry

Strawberry

Peanut Butter

Vanilla

Chocolate

Chocolate

Mint

Vanilla

Butter Pecan

Rocky Road

Vanilla

Vanilla

Vanilla

Chocolate

Butter Pecan

Peanut Butter

Strawberry

Fudge Ripple

Vanilla

Butter Pecan

Vanilla

Vanilla

Chocolate

Orange Sherbet

Mint

Orange Sherbet

Butter Pecan

Chocolate

Vanilla

Orange Sherbet

Fudge Ripple

Butter Pecan

Chocolate

Chocolate

Vanilla

Vanilla

Vanilla

Strawberry

Fudge Ripple

Peanut Butter

Mint

Strawberry

Vanilla

Strawberry

Rocky Road

Vanilla

Strawberry

Chocolate

Orange Sherbet

Vanilla

Rocky Road

Chocolate

Peanut Butter

Chocolate

Vanilla

Chocolate

Chocolate

Chocolate

Butter Pecan

Peanut Butter

Strawberry

Chocolate

Chocolate

Orange Sherbet

Fudge Ripple

Strawberry

Rocky Road

Butter Pecan

Orange Sherbet

Strawberry

Strawberry

Fudge Ripple

Rocky Road

Chocolate

Fudge Ripple

Peanut Butter

Butter Pecan

Chocolate

Strawberry

Butter Pecan

Peanut Butter

Vanilla

Vanilla

Vanilla

Vanilla

Butter Pecan

Vanilla

Mint

Mint

Orange Sherbet

Vanilla

Chocolate

Strawberry

Peanut Butter

Peanut Butter

Rocky Road

Vanilla

Butter Pecan

Strawberry

Vanilla

Strawberry

Mint

Fudge Ripple

Rum Raisin

Chocolate

Strawberry

Orange Sherbet

Peanut Butter

Vanilla

Fudge Ripple

Vanilla

Strawberry

Strawberry

Strawberry

Vanilla

Vanilla

Fudge Ripple

Fudge Ripple

Mint

Strawberry

Vanilla

Vanilla

Chocolate

Mint

Chocolate

Vanilla

Strawberry

Orange Sherbet

Vanilla

Mint

Vanilla

Fudge Ripple

Orange Sherbet

Vanilla

Vanilla

Mint

Chocolate

Mint

Butter Pecan

Vanilla

Chocolate

Fudge Ripple

Chocolate

Strawberry

Vanilla

Chocolate

Vanilla

Peanut Butter

Chocolate

Strawberry

Orange Sherbet

Strawberry

Strawberry

Rocky Road

Vanilla

Vanilla

Vanilla

Vanilla

Mint

Vanilla

Butter Pecan

Chocolate

Peanut Butter

Chocolate

Fudge Ripple

Vanilla

Vanilla

Vanilla

Orange Sherbet

Rocky Road

Butter Pecan

Vanilla

Peanut Butter

Fudge Ripple

Fudge Ripple

Strawberry

Chocolate

Chocolate

Rocky Road

Chocolate

Fudge Ripple

Orange Sherbet

Chocolate

Strawberry

Vanilla

Strawberry

Strawberry

Vanilla

Orange Sherbet

Vanilla

Butter Pecan

Vanilla

Vanilla

Rocky Road

Strawberry

Vanilla

Orange Sherbet

Peanut Butter

Chocolate

Orange Sherbet

Vanilla

Vanilla

Chocolate

Chocolate

Strawberry

Mint

Peanut Butter

Rocky Road

Vanilla

Vanilla

Mint

Chocolate

Vanilla

Strawberry

Butter Pecan

Vanilla

Vanilla

Orange Sherbet

Vanilla

Fudge Ripple

Mint

Strawberry

Orange Sherbet

Vanilla

Peanut Butter

Chocolate

Vanilla

Butter Pecan

Butter Pecan

Chocolate

Vanilla

Chocolate

Chocolate

Peanut Butter

Vanilla

Rocky Road

Peanut Butter

Vanilla

Rocky Road

Peanut Butter

Strawberry

Peanut Butter

Vanilla

Vanilla

Mint

Rocky Road

Orange Sherbet

Vanilla

Vanilla

Fudge Ripple

Mint

Vanilla

Vanilla

Chocolate

Mint

Chocolate

Strawberry

Mint

Chocolate

Butter Pecan

Vanilla

Chocolate

Mint

Fudge Ripple

Vanilla

Vanilla

Chocolate

Orange Sherbet

Butter Pecan

Orange Sherbet

Chocolate

Vanilla

Rocky Road

Peanut Butter

Vanilla

Chocolate

Vanilla

Mint

Rocky Road

Chocolate

Orange Sherbet

Vanilla

Chocolate

Fudge Ripple

Strawberry

Butter Pecan

Vanilla

Vanilla

Mint

Fudge Ripple

Vanilla

Vanilla

Fudge Ripple

Fudge Ripple

Vanilla

Rocky Road

Peanut Butter

Vanilla

Vanilla

Mint

Vanilla

Rocky Road

Fudge Ripple

Chocolate

Chocolate

Orange Sherbet

Rocky Road

Vanilla

Mint

Strawberry

Butter Pecan

Vanilla

Vanilla

Vanilla

Rocky Road

Vanilla

Chocolate

Vanilla

Strawberry

Peanut Butter

Vanilla

Chocolate

Chocolate

Mint

Strawberry

Rocky Road

Chocolate

Vanilla

Strawberry

Butter Pecan

Vanilla

Chocolate

Chocolate

Strawberry

Mint

Chocolate

Rocky Road

Vanilla

Strawberry

Vanilla

Chocolate

Vanilla

Vanilla

Vanilla

Rocky Road

Vanilla

Strawberry

Chocolate

Chocolate

Vanilla

Mint

Fudge Ripple

Vanilla

Chocolate

Strawberry

Strawberry

Orange Sherbet

Chocolate

Strawberry

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!