Question: Make sure to show your mycandy file, your source code, and your program output. You can make all three parts here be part of one

Make sure to show your mycandy file, your source code, and your program output. You can make all three parts here be part of one program just make sure to show your source code and output and comment where part 1, part 2, and part 3 is in your code.Part 1 make a comma separated fileCreate a simple text file called mycandyThe first line of the file will beCandy Name, Candy Calories, Total Fat GramsAlmond Joy, 250,9Snickers, 240,4Next, add five lines to the file by hand using your favorite five candy bars information. Each line's data will be separated by commas.Part 2 read in the file and make a list of candy objectsCreate a class called Candy which keeps track of the three pieces of informationRead in the file line by line and create a Candy class instance for each candy bar you have, and add that new instance to a list.Once you have the list created (its easiest to use a LinkedList), loop through the list and print the candy bar info out to the consolePart 3 append a line to the fileWhen you want to append to a file your second argument to the file writer is usually true which is to say, if the file exists, you want to append to it. Add a line of code to append one more candy bars information to your mycandy file. Show what your new text file looks like after the append

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!