Question: In this program C + + , you will analyze the results of some ghost hunts. You will read data from ghosts.txt ( a sample

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, 1 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 15, 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 3
Shadows or Orbs S 1
Footsteps F 2
Full Body Apparition A 5
Objects moving on own O 5
Doors shutting on own D 3
ThermoCamera hot or cold spots T 2
Sample Output
Analyzing Ghost Hunt Data ...
Found 7 instances of shadows or orbs.
Found 1 instances of a full body apparition.
Found 3 instances of doors shutting on their own.
The haunting score for this place is 21.
This place is haunted.
Great job! On to the next one.
Analyzing Ghost Hunt Data ...
Found 2 instances of EVP (Electronic Voice Phenomena).
Found 2 instances of footsteps.
Found 1 instances of objects moving on their own.
The haunting score for this place is 15.
This place is probably not haunted.
Great job! On to the next one.

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!