Vechile - { public static void main(Stringargs) { Vehicle...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
class Vehicle { private String color; private int yr; private String make; private String model; private String vin; public void setColor(String c) { color = c; } public String getColor() { return color; } public void setYear(int y) { yr = y; } public int getYear() { return yr; } public void setMake(String mk) { make = mk; } public String getMake() { return make; } public void setModel(String mo) { model = mo; } public String getModel() { return model; } public void setVin(String v) { vin = v; } public String getVin() { return vin; } public class TestVehicle
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { public static void main(Stringargs) { Vehicle one = new Vehicle(); one.setColor("red"); one.setYear(2009); one.setMake("Benz"); one.setModel("Mercedes"); one.setVin("AB||MIA"); System.out.println("The Color is " + one.getColor()); System.out.println("The Year is " + one.getYear()); System.out.println("The Maker is " + one.getMake()); System.out.println("The Model is " + one.getModel()); System.out.println("The Vin is " + one.getVin()); }}}...
View Full Document

This note was uploaded on 10/04/2010 for the course COMPUTER S 106 taught by Professor Moore during the Spring '08 term at Clark Atlanta.

Page1 / 2

Vechile - { public static void main(Stringargs) { Vehicle...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online