Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Bus and modified Vehicle Noises #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/VehicleNoises.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public static void main(String[] args) {

Unicycle myUnicycle = new Unicycle("Red",false,25);
System.out.println(myUnicycle.makeNoise());

Bus SchoolBus = new Bus(60, true, true);
System.out.println(SchoolBus.makeNoise());

}

Expand Down
66 changes: 66 additions & 0 deletions src/model/Bus.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package model;

/**
* @author Joe Shilkaitis - jshilkaitis
* CIS175 - Fall 2022
* Aug 29, 2022
*/
public class Bus {
int seats;
boolean schoolBus;
boolean flatNose;

public Bus(int seats, boolean schoolBus, boolean flatNose) {
super();
this.seats = seats;
this.schoolBus = schoolBus;
this.flatNose = flatNose;
}

public String makeNoise() {
return "BBRRRRMMM";
}

/**
* @return the seats
*/
public int getSeats() {
return seats;
}

/**
* @param seats the seats to set
*/
public void setSeats(int seats) {
this.seats = seats;
}

/**
* @return the schoolBus
*/
public boolean isSchoolBus() {
return schoolBus;
}

/**
* @param schoolBus the schoolBus to set
*/
public void setSchoolBus(boolean schoolBus) {
this.schoolBus = schoolBus;
}

/**
* @return the flatNose
*/
public boolean isFlatNose() {
return flatNose;
}

/**
* @param flatNose the flatNose to set
*/
public void setFlatNose(boolean flatNose) {
this.flatNose = flatNose;
}

}
3 changes: 0 additions & 3 deletions src/module-info.java

This file was deleted.