djbullano
2011-04-19 14:04:39 UTC
Weight < 10 pounds $ 8.00 per day
10 <=Weight < 30 $12.00 per day
30 <=Weight < 50 $18.00 per day
Weight >=50 pounds $ 22.00 per day
A text file has information about the dogs that are boarding at the kennel. Each line contains the following information for one dog:
the last name of the dog’s owner, the dog’s weight , the number of days the dog is staying at the kennel. The three data items are separated by blank spaces. The two numbers are both integers.
Your output should contain:
Four labeled columns of information about the dogs in the file
Dog owner dog weight number of days total cost
A counter of the total number of dogs processed.
A count of dogs in each category.
The total amount of money collected for all dogs in the file.
Money should have 2 decimal places and a dollar sign.
here is the txt file
a.txt
Smith 50 5
Jones 70 5
Hacker 42 3
Henson 10 8
Byrd 30 1
Jarman 25 10
Shaffer 12 7
Klaus 6 3
can someone lead me in the right direction. all i want to do is print out the information from the text file then i can probably do the rest. if you can help me i would appreciate it greatly. im studying for my lab final. this is just a practice for lab final. i wont be turning this in, so its not hw
thank you