-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLab7.java
More file actions
63 lines (51 loc) · 1.91 KB
/
Copy pathLab7.java
File metadata and controls
63 lines (51 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import java.util.Scanner;
public class Lab7
{
public static void main(String[]args)
{
Scanner keyboard = new Scanner(System.in);
Customer c1 = new Customer();
Car car1 = new Car();
ServiceQuote service1 = new ServiceQuote();
System.out.print("enter customer's name:");
String name=keyboard.nextLine();
System.out.print("enter customer's address:");
String address=keyboard.nextLine();
System.out.print("enter customer's phone number:");
String phone=keyboard.nextLine();
System.out.println(" ");
c1.setName(name);
c1.setAddress(address);
c1.setPhone(phone);
System.out.print("enter car make:");
String make=keyboard.nextLine();
System.out.print("enter car model:");
String model=keyboard.nextLine();
System.out.print("enter car year:");
double year=keyboard.nextDouble();
car1.setMake(make);
car1.setModel(model);
car1.setYear(year);
System.out.print("enter the parts charges:");
double pcharges=keyboard.nextDouble();
System.out.print("enter the labor charges:");
double lcharges=keyboard.nextDouble();
service1.setPartsCharges(pcharges);
service1.setPartsLabor(lcharges);
System.out.println("Joe's automotive Shop");
System.out.println("Service estimate");
System.out.println("");
System.out.println("Customer name\t\t"+ c1.getName());
System.out.println("Customer Address\t\t"+ c1.getAddress());
System.out.println("Custome phone\t\t"+c1.getPhone());
System.out.println("");
System.out.println("Car make\t\t"+car1.getMake());
System.out.println("CAr model\t\t"+car1.getModel());
System.out.println("Car year\t\t"+ car1.getYear());
System.out.println("");
System.out.println("Parts Charges\t\t"+ service1.getPartsCharges());
System.out.println("labor Charges\t\t"+ service1.getLaborCharges());
System.out.println("Sales Tax\t\t"+ service1.getSalesTax());
System.out.println("Total charges\t\t"+ service1.getTotalCharges());
}
}