Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Statistics{
- public int setTtlTime(int gametime){
- int ttltime=0;
- ttltime+=gametime;
- return ttltime;
- }
- public void getttltime(){
- }
- public int setTtlHits(int shiphits){
- int ttlhits=0;
- ttlhits+=shiphits;
- return ttlhits;
- }
- public void getTtlHits(){
- }
- //use insertion sort
- public int setHitMiss(int hitmiss[]){
- int in=0, out=0;
- int temp=0;
- for(out=1; out<in; out++) // out is dividing line
- {
- temp = hitmiss[out]; // remove marked item
- in = out; // start shifts at out
- while(in>0 && hitmiss[in-1] >= temp) // until one is smaller,
- {
- hitmiss[in] = hitmiss[in-1]; // shift item right,
- --in; // go left one position
- }
- hitmiss[in] = temp;
- // insert marked item
- }
- return temp;// end for
- }
- public void getAvgHitMiss(){
- }
- public int setHighestScore(int highscore){
- int temp=0;
- temp=highscore;
- if (highscore<temp){
- highscore=temp;}
- return highscore;
- }
- public void getHighestScore(){
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment