Generation

generate functionSat, 12 Nov 2022

Insurance comparison

public class InsuranceComparison { public static void main(String[] args) { // Fill in variables below with values given in instructions. int davidMonthly = 0; int davidYearly = 0; int goliathMonthly = 0; int goliathYearly = 0; int goliathSixMonths = 0; int goliathYearlyDiscount = 0; // Do not edit anything below this line. int davidYearlyWithTax = davidYearly + (davidYearly / 10); if (davidYearlyWithTax < goliathSixMonths) { System.out.println("Choose David's insurance!"); } else if (davidYearlyWithTax == goliathSixMonths) { System.out.println("Choose either insurance company."); } else if (davidYearlyWithTax > goliathSixMonths && davidYearlyWithTax < goliathYearlyDiscount) { System.out.println("Choose Goliath's insurance!"); } else if (davidY

Questions about programming?Chat with your personal AI assistant