Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Bus {
- private int bus_name;
- private int capasity;
- public Bus(int bus_name, int capasity) {
- this.bus_name = bus_name;
- this.capasity = capasity;
- }
- public String toString() {
- return "The bus number " + bus_name + " has " + capasity + " places";
- }
- public int getBus_name() {
- return bus_name;
- }
- public void setBus_name(int bus_name) {
- this.bus_name = bus_name;
- }
- public int getCapasity() {
- return capasity;
- }
- public void setCapasity(int capasity) {
- this.capasity = capasity;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement