This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> |
This file contains 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
<script src="vue.js"></script> | |
<div id="exercise"> | |
<!-- 1) Fill the <p> below with your Name and Age - using Interpolation --> | |
<p>{{name}} - {{age}}</p> | |
<!-- 2) Output your age, multiplied by 3 --> | |
<p>{{age}} * 3 = {{ doMath() }}</p> | |
<!-- 3) Call a function to output a random float between 0 and 1 (Math.random()) --> | |
<p>Random Number -> {{getRandom()}}</p> | |
<!-- 4) Search any image on Google and output it here by binding the "src" attribute --> |
This file contains 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
import java.util.Observable; | |
/** | |
* Created by gjvongraves on 3/13/17. | |
*/ | |
public class NonPlayerCharacter extends Observable{ | |
/* Bella is in control over many aspects of the game's world. | |
Specifically, she makes sure the user is not attacked by random NPCs. | |
There is only one NonPlayerCharacter. Hence, she will be a singleton | |
*/ |
This file contains 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
import java.util.InputMismatchException; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
int myAge; | |
Scanner scanner = new Scanner(System.in); | |
//try statement. Make sure myAge is indeed, an integer | |
try{ |