This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Author: Anoushka Mishra | |
* December 9, 2016 | |
*/ | |
public class GoKartTrack { | |
// private instance variables | |
private int capacity; //number of lanes on this track | |
private GoKart[] contestants; //an array GoKart objects entered into the race | |
private int lastEnteredContestant = -1; //index of the last filled spot in the contestants array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Author: Anoushka Mishra | |
* November 15, 2016 | |
*/ | |
import java.util.Scanner; | |
public class TestGoKart { | |
// This program tests the GoKart class. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Author: Anoushka Mishra | |
* November 15, 2016 | |
*/ | |
public class GoKart { | |
//This program is a new GoKart class. It uses accessor and mutator methods. | |
/*Private instance variables*/ | |
private String name; | |
private int powerSource; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Author: Anoushka Mishra | |
* October 12, 2016 | |
*/ | |
import java.util.Scanner; | |
public class Assignment5 { | |
// This program is a game where user needs to guess a phrase with maximum 5 tries |