Need the answer in CSharp programming not java.
Joe’s Automotive
Joe’s Automotive performs the following routine maintenance
services:
• Oil change—$26.00
• Lube job—$18.00
• Radiator flush—$30.00
• Transmission flush—$80.00
• Inspection—$15.00
• Muffler replacement—$100.00
• Tire rotation—$20.00
Joe also performs other nonroutine services and charges for parts
and labor ($20 per
hour). Create an application that displays the total for a
customer’s visit to Joe’s.
The form should resemble the one shown in Figure 6-28 .
Figure 6-28 Automotive form
The application should have
the following value-returning methods:
• OilLubeCharges —Returns the total charges for an oil change
and/or a lube
job, if any.
• FlushCharges —Returns the total charges for a radiator flush
and/or a transmission
flush, if any.
• MiscCharges —Returns the total charges for an inspection, muffler
replacement,
and/or a tire rotation, if any.
• OtherCharges —Returns the total charges for other services (parts
and labor),
if any.
• TaxCharges —Returns the amount of sales tax, if any. Sales tax is
6% and is
charged only on parts. If the customer purchases services only, no
sales tax is
charged.
• TotalCharges —Returns the total charges.
The application should have the following void methods, called when
the user
clicks the Clear button:
• ClearOilLube —Clears the check boxes for oil change and lube
job.
• ClearFlushes —Clears the check boxes for radiator flush and
transmission
flush.
• ClearMisc —Clears the check boxes for inspection, muffler
replacement, and
tire rotation.
• ClearOther —Clears the text boxes for parts and labor.
• ClearFees —Clears the labels that display the labels in the
section marked Summary
.
Below is the solution:
code:
using System;
using System.Windows.Forms;
namespace AutomotiveForm
{
public partial class frmMain : Form
{
// Declare constant
variables with value that cnnot change
const decimal OIL_CHANGE
= 26.00m;
const decimal LUBE_JOB =
18.00m;
const decimal
RADIATOR_FLUSH = 30.00m;
const decimal
TRANSMISSION_FLUSH = 80.00m;
const decimal INSPECTION
= 15.00m;
const decimal
REPLACE_MUFFLER = 100.00m;
const decimal
TIRE_ROTATION = 20.00m;
const decimal TAX =
0.06m; //6% tax
private decimal total =
0m; //total value to 0 initialize
decimal
serviceslabor;
decimal parts;
decimal finaltax;
decimal fees;
public
frmMain()
{
InitializeComponent();
}
//checked event for
the oilchangeCheckbox that will add the total
private void
oilchangeCheckbox_CheckedChanged(object sender, EventArgs e)
{
total += OIL_CHANGE;
}
//checked event for the
lubejobCheckbox that will add the total
private void
lubejobCheckbox_CheckedChanged(object sender, EventArgs e)
{
total += LUBE_JOB;
}
//checked event for the
radiatorflushCheckbox that will add the total
private void
radiatorflushCheckbox_CheckedChanged(object sender, EventArgs
e)
{
total += RADIATOR_FLUSH;
}
//checked event for the
transmissionflushCheckbox that will add the total
private void
transmissionflushCheckbox_CheckedChanged(object sender, EventArgs
e)
{
total += TRANSMISSION_FLUSH;
}
//checked event for the
inspectionCheckbox that will add the total
private void
inspectionCheckbox_CheckedChanged(object sender, EventArgs e)
{
total += INSPECTION;
}
//checked event for the
replacemufferCheckbox that will add the total
private void
replacemufferCheckbox_CheckedChanged(object sender, EventArgs
e)
{
total += REPLACE_MUFFLER;
}
//checked event for the
tirerotationCheckbox that will add the total
private void
tirerotationCheckbox_CheckedChanged(object sender, EventArgs
e)
{
total += TIRE_ROTATION;
}
//total button event
that will calulate the total, tax,
private void
totalButton_Click(object sender, EventArgs e)
{
serviceslabor = decimal.Parse(laborTextbox.Text) + total;
parts = decimal.Parse(partsTextbox.Text);
finaltax = TAX * parts;
MessageBox.Show(finaltax.ToString());
fees = total + parts + finaltax + serviceslabor;
lblserviceslabor.Text = serviceslabor.ToString("n2");
lblParts.Text = parts.ToString("n2");
lblTax.Text = finaltax.ToString("n2");
lblTotalFees.Text = fees.ToString("n2");
}
//close butto
event
private void
exitButton_Click(object sender, EventArgs e)
{
this.Close(); //close the form
}
//clear button
event
private void
clearButton_Click(object sender, EventArgs e)
{
//clears all the label, textbox, and the unchech the checkbox
total = 0m; //set the total to 0
lblserviceslabor.Text = String.Empty;
lblParts.Text = String.Empty;
lblTax.Text = String.Empty;
lblTotalFees.Text = String.Empty;
oilchangeCheckbox.Checked = false;
lubejobCheckbox.Checked = false;
radiatorflushCheckbox.Checked = false;
transmissionflushCheckbox.Checked = false;
inspectionCheckbox.Checked = false;
replacemufferCheckbox.Checked = false;
tirerotationCheckbox.Checked = false;
}
}
}
output:
Joe’s Automotive Joe’s Automotive performs the following routine maintenance services: • Oil chan...
I need help creating a code for the problem in Python. Joe's Automotive Joe's Automotive performs the following routine maintenance services: Oil change-$30.00 . Lube job-$20.00 Radiator flush-$40.00 Transmission flush-$100.00 Inspection-$35.00 Muffler replacement-$200.00 Tire rotation- $20.00 Write a GUI program with check buttons that allow the user to select any or all of these services. When the user clicks a button, the total charges should be displayed Joe's Automotive Joe's Automotive performs the following routine maintenance services: Oil change-$30.00 ....
Lab Chapter 12 Vinnie's Auto Shop performs the following routine maintenance services: • Oil change: $35.00 • Lube job: $25 • Battery replacement: $80 • Tire rotation: $20 Vinnie also performs other nonroutine services and charges for parts and for labor ($60 per hour). Using JavaFX, create a GUI application that buttons for the above list of services and textfields/buttons for parts and labor. As the user selects buttons, a total amount is to be displayed Grading Criteria • Documentation...