Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this program C + + you will analyze the results of some ghost hunts. You will read data from ghosts.txt ( a sample is
In this program C you will analyze the results of some ghost hunts. You will read data from ghosts.txt a sample is provided in the starter code The file contains evidence collected during a recent ghost hunt. There will be three events in a file, per line. Each line will have the event code and the number of times that event occurred. As you read in the event, you will need to calculate an overall haunting score for the ghost hunt. If the haunting score is greater than then you should display the message "This place is haunted." Otherwise, the program should display "This place is probably not haunted." Before the program finishes, you should print the message "Great job! On to the next one."
The possible events and the number of points each occurrence is worth are summarized in the table below.
Ghost Hunting Events
Event Event Code Points
EVP Electronic Voice Phenomena E
Shadows or Orbs S
Footsteps F
Full Body Apparition A
Objects moving on own O
Doors shutting on own D
ThermoCamera hot or cold spots T
Sample Output
Analyzing Ghost Hunt Data
Found instances of shadows or orbs.
Found instances of a full body apparition.
Found instances of doors shutting on their own.
The haunting score for this place is
This place is haunted.
Great job! On to the next one.
Analyzing Ghost Hunt Data
Found instances of EVP Electronic Voice Phenomena
Found instances of footsteps.
Found instances of objects moving on their own.
The haunting score for this place is
This place is probably not haunted.
Great job! On to the next one.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started