generate functionMon, 10 Apr 2023

write a program about the Department of Transport that needs to monitor the registration of people's vehicles. Based on price information and cylinder capacity of the vehicle, the Department of Transport will calculate the environmental tax to be paid in advance When buying a car as follows: - Under 100cc, 1% of the vehicle value - From 100 to 200cc, 3% of the car's value - Over 200cc, 5% of the car's value Design and implement the Vehicle class to manage vehicle attributes and suitable method. The class must have constructors and must be inclusive encapsulation Then let's create a few xe1, xe2, xe3 objects of the Vehicle class in a chapter other program. Enter information for these objects and export the registration tax declaration sheet of each vehicle in java

private String tenXe; private int dungTich; private int gia; private String hangXe; private String maSoXe; private int thuePhi; private boolean isThuePhi; public Vehicle(String tenXe, int dungTich, int gia, String hangXe, String maSoXe, int thuePhi, boolean isThuePhi) { this.tenXe = tenXe; this.dungTich = dungTich; this.gia = gia; this.hangXe = hangXe; this.maSoXe = maSoXe; this.thuePhi = thuePhi; this.isThuePhi = isThuePhi; } public String getTenXe() { return tenXe; } public void setTenXe(String tenXe) { this.tenXe = tenXe; } public int getDungTich()

Questions about programming?Chat with your personal AI assistant