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 part and part is in your code.Part 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, Snickers, Next, 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 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 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
