- Copy down your example of being respectful and where it applies (Commons, Halls, Class, Bus, Restrooms, Everywhere)
- Go to https://repl.it/languages/java
or use your favorite IDE
- Copy this code
class Main {
public static void main(String[] args){
double chance = Math.random();
System.out.println(chance);
if(chance<0.5)
System.out.println("bad news, you were impatient in line");
else
System.out.println("great, you were patient in line");
}
}
- Check to be sure it runs,
- Modify it to choose between respectful and disrespectful behavior.
- What would be some ways to make the program even more interesting?