不知道错在哪里?//HouseSign.java-Thisprogramcalculatespricesforcustomhousesigns.publicclassHouseSign{publicstaticvoidmain(Stringargs[]){//Thisistheworkdoneinthehousekeepi...
不知道错在哪里?
// HouseSign.java - This program calculates prices for custom house signs.
public class HouseSign
{
public static void main(String args[])
{
// This is the work done in the housekeeping() method
// Declare and initialize variables here.
double charge;
String color_char;
String wood_type;
int basis_letter;
double min_charge= 30.00;
double color_charge=12;
double wood_typeCharge=15;
double letter_Charge=3;
double add_charge;
double chr_charge;
// Charge for this sign.
charge= min_charge + add_charge;
// Number of characters.
basis_letter = 8;
// Color of characters.
color_char="gold";
// Type of wood.
wood_type = "oak";
// This is the work done in the detailLoop() method
// Write assignment and if statements here as appropriate.
if (color_char.equals("gold"));
color_charge=12;
else if(wood_type.equals("oak"));
wood_typeCharge=15;
else if(basis_letter = 8);
chr_charge=letter_Charge*2;
else
add_charge=color_charge+wood_typeCharge+chr_charge;
// This is the work done in the endOfJob() method
// Output Charge for this sign.
System.out.println("The charge for this sign is $" + charge);
System.exit(0);
}
}
展开