Create an Insurance object (name, age, gender, policy type, car reg, licence type, cover required). Using a GUI, take the information from the user and calculate their quote. Rules: All insurance quotes start with a base price of €200, and depending on the answers above, different amounts are added: Male: €200, Female: €100 Age < 25: €150, >= 25: €100 Car <= 5 years: €100, > 5 and < 10: €200, >= 10: €300 Provisional Licence: €250, Full: €100 Comprehensive: €200, Third party: €100
I have crested 3 java classes Insurancees, InsurancesGUI and Driver. I just need help with all the IF STATEMENTS such as:
if ( Preson.getGender()).isEqual(" Male ")) // is male
{
total += 200; //Adds 200 to total
}
else // = female
{
total += 100;
}
Aucun commentaire:
Enregistrer un commentaire