Can Anyone Help Me With A Dev C++ Program?

Animal insurance calculator
Write, design and test a program that calculates and prints the insurance fee to
pay for a pet according to the following rules:
A dog that has been neutered cost £50.
A dog that has not been neutered costs £80.
A cat that has been neutered costs £40.
A cat that has not been neutered costs £60.
A bird or reptile costs £10.
Any other animal generates an error message.
The program should prompt the user for the appropriate information:
1. The owner’s initial surname, the pets name, gender & age should be requested.
2. A code must be used to determine the kind of animal (i.e. D represents a dog, C
represents a cat , B represents a bird, R represents a reptile, and anything else
reoresents some other kind of animal).
3. Once the type of animal has been determinded, other factors are requested that
may affect the premium’s calculation:
a. Animals aged over 5 incur a 2% increse in price for each year they are over 5
b. Male animals incur a 5% increse if they are less than 2 years old.
c. If the animal has had an accident in the past year an extra 5% increse should be added.
4. After displaying the insurance fee, the program should ask the user if (s) he wants
to insure another animal and should allow them to add the details for the next
animal (obiously they shouldn’t have to entre their own details again).
5. After entering details for all of their animals it should print out a total cost for
each animal with a breakdown of any discounts or price increses out a total
for all of their animals.
6. If the user enters a question mark (?) for any answer your program should give
some on screen help to tell them more about it.
it is up to you to:
Decide where and if other error messages should be used in order that the
data displayed and stored is in most appropriate format.
Use a range of programming techniques to show what you have learned
e.g. loops, ifs, arrays.
Use functions to divide your code up and make it easier to test.
All code should be commented and you should show that you have made your program user
friendly with appropriate messages.
Must say ewhy you used a function.
Learning Outcomes
Understand the features of procedural programming
2 Be able to use the tools and techniques of a procedural language
3 Be able to design procedural applications
4 Be able to implement procedural applications

Both comments and pings are currently closed.

Comments are closed.

Powered by WordPress | Designed by: free css template | Thanks to hostgator coupon and web hosting reviews