Skip to content
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
5 changes: 5 additions & 0 deletions Vehicle/src/VehicleNoise.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import model.Car;
import model.Example;
import model.Moped;
import model.Car;
import model.Train;

Expand All @@ -23,6 +24,10 @@ public static void main(String[] args) {
// my vehicle noise
Car Mustang = new Car();
System.out.println(Mustang.makeNoise());

// Moped noise
Moped Honda = new Moped();
System.out.println(Honda.makeNoise());

}

Expand Down
73 changes: 73 additions & 0 deletions Vehicle/src/model/Moped.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
package model;
/**
* Cameron Mockobee - cmockobee1@dmacc.edu
* CIS175 = - Fall 2023
* Aug 30, 2023
*/

public class Moped {
private String name = "Honda";
private int maxSpeed;
private String color;

public Moped() {
super();
}

/**
* @param name
* @param maxSpeed
* @param color
*/
public Moped(String name, int maxSpeed, String color) {
this.name = name;
this.maxSpeed = maxSpeed;
this.color = color;
}

/**
* @return the name
*/
public String getName() {
return name;
}

/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}

/**
* @return the maxSpeed
*/
public int getMaxSpeed() {
return maxSpeed;
}

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

/**
* @return the color
*/
public String getColor() {
return color;
}

/**
* @param color the color to set
*/
public void setColor(String color) {
this.color = color;
}
public String makeNoise() {
return "Vroom Vroom";
}

}