Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Srabon;
- public class Toyota extends Car {
- double price;
- String year;
- int number;
- public Toyota(double price,String year,int number,String model,String company,Engine eng,Dashboard das)
- {
- super(model,company);
- this.price=price;
- this.year=year;
- this.number=number;
- this.eng=eng;
- this.das=das;
- }
- public void changefuel()
- {
- System.out.println("ChangeFuel method");
- }
- public void changebattery()
- {
- System.out.println("Change battery method");
- }
- public void display()
- {
- System.out.println("price "+price);
- System.out.println("year "+year);
- System.out.println("number "+number);
- System.out.println("model "+model);
- System.out.println("company "+company);
- System.out.println("Capacity "+eng.cap);
- System.out.println("company "+das.size);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement