Question: Instructions You are going to write a program that will read the contents of an electronic diary. It will analyze each day as a good




Instructions You are going to write a program that will read the contents of an electronic diary. It will analyze each day as a good day ), a bad day or a neutral day:. The entry analysis will be grouped by month in a summary report that is written to a file. Diary Entries Each line in the diary will be a single entry It will begin with a 5 character date, where the first 3 characters indicate the month of the entry and the last 2 characters indicate the day of the entry. After the date will follow all the text for that entry Jane1 New year: Everything is great! For the example above, "Jan01" is the date "New year: Everything is great!" is the diary text to analyze. You must use line- based file processing to access each entry in the diary, but you will need to use token-based processing to analyze the text for each entry. diary.txt The contents of the electronic diary will be stored in a file called diary.txt Here is a sample diary.txt that you can use for testing your program: Jane1 New year: Everything is great! | Jan14 Today I got free ice cream . SO GOOD! #bestdayever Feb10 Meh. I'm fine. Feb21 I'm having a terrible horrible no good day Feb23 Yesterday was horrible, but today is great! Yay! May02 Sad Panda . #terribleday May15 Hello World, today is fabulous! #yay | Jun01 Great! Yay! Good! Yay! Happy, Happy. #goodgreatyay Jun11 Yay, yay, yay! I'm having an awfully great day Analyzing each entry
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
