ca8 please bid only if you guarantee perfect score


Write a Java program called to create an Excel spreadsheet

  1. Create a class called Food to represent a Thanksgiving food item. Fields include name, calories, carbs (1 point)
  2. In a main method (of a different class), ask the user “How many foods are you going to eat for Thanksgiving?”.
  3. Loop through each food item and prompt the user to enter the name, calories, and grams of carbs for that food item. Create a Food object with this data, and store each Food object in an ArrayList (2 points)
  4. Create a method called printThanksgivingDinner(), that will take an ArrayList of Food objects as an argument and create an Excel spreadsheet. This method should loop through the ArrayList and write the data to a file called thanksgiving.csv (CSV stands for Coma Separated Values) (1 point)
  5. The data should be printed in this format below. Be sure to include a header as the first line of code written the the file, and a total row at the end. You will see that every row will be a new row in the Excel spreadsheet, and every coma will create a new column. (1 point)
  6. After collecting all the food data in your main method, pass the ArrayList to the printThanksgivingDinner () method. (1 point)

Hint: To append to a file, check out

Example thanksgiving.csv file (You should be able to open this file in Excel)

Name, Calories, Carbs
Turkey, 200, 18.3
Mashed Potatoes, 300, 12.4
Corn, 100, 9.5
Total, 400, 30.2


Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code “Newclient” for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.

The post ca8 please bid only if you guarantee perfect score appeared first on Custom Nursing Help.

"Is this qustion part of your assignmentt? We will write the assignment for you. click order now and get up to 40% Discount"