Share
Explore

2021.11.05 Java Game

implement requirement:
1. computer generates a number with a random number generator

package javaapplication4;

public class JavaApplication4 {

static int UserGuess;
// 4 kinds of variables in Java
// distinction beween static and instance
// 3 characteristics of an OBJECT:
// 3 things an OBJECT has

public static void main(String[] args) {
// let's capture the user input
// UserGuess = Integer.parseInt(args[0]);
// GameEngine g = new GameEngine();
System.out.println(GameEngine.run());
}
}

class GameEngine {


}
Requirements:
Make a guessing game
1. done: program invites user to play to play a game
2. done:
asks user to guess a number between to 1 to 10
3. computer generates a number with a random number generator
4. if user guesses higher than computer: user wins
A. put the minimum amount of code in public static void main

Algorithm Design:
Table 1
0
Column 1
1
done: Capture the User INPUT
There are no rows in this table

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.