new semester here we go

This commit is contained in:
Medium Fries 2019-03-15 01:25:45 -07:00
parent c319e77f12
commit fa12687849
80 changed files with 7781 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
sem/ sem/
*class
*swp *swp

View File

@ -0,0 +1,98 @@
// Name: Alejandro Santillana
import java.util.Random;
import java.util.ArrayList;
import java.io.FileReader;
import java.io.FileInputStream;
import java.io.BufferedReader;
import java.io.IOException;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.scene.control.TextField;
import javafx.scene.layout.HBox;
public class hangman extends Application{
public static String target_word;
public static char[] masked_word;
public static int attempt_count = 1;
public static TextField input_field;
public static void reveal_char(char c) {
// we should go through again and reveal any new characters
for(int i = 0;i<target_word.length();i++) {
if(c == target_word.charAt(i)) {
masked_word[i] = c;
}
}
}
public static Boolean checkInput(String str) {
if(str.length() > 1 || str.length() == 0) {
return false;
}
// fallthrough checking proper length inputs
char c = str.charAt(0);
if(c < 'A') {
return false;
}
if(c>'Z' && c<'a') {
return false;
}
if(c > 'z') {
return false;
}
// fallthrough for letters of length of 1
return true;
}
@Override
public void start(Stage stage) {
// draw the first image
image = new Image("./img/h1.gif", false);
Label label = new Label("Word to guess: " + new String(masked_word));
// seutp the input field
input_field = new TextField();
// scene for things to live inside of
Scene scene = new Scene(new StackPane(label), 640, 480);
stage.show();
stage.setScene(scene);
}
public static void main(String[] args) {
// First we'll read in our file
ArrayList<String> words = new ArrayList<String>();
try {
BufferedReader reader = new BufferedReader(new FileReader("words.txt"));
String line;
while((line = reader.readLine())!= null) {
words.add(line);
}
}
catch(IOException e) {
e.printStackTrace();
}
// pick a random item from our list as the word to guess for
Random r_idx = new Random();
int index = r_idx.nextInt(words.size());
target_word = new String(words.get(index));
masked_word = new char[target_word.length()];
// seutp the masked word with underscores
for(int i = 0;i<target_word.length();i++) {
masked_word[i] = '_';
}
// start the application thing
launch();
}
}

BIN
338/g-hangman/img/h1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

BIN
338/g-hangman/img/h2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
338/g-hangman/img/h3.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
338/g-hangman/img/h4.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
338/g-hangman/img/h5.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
338/g-hangman/img/h6.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
338/g-hangman/img/h7.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
338/g-hangman/img/jpg/.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

6
338/g-hangman/words.txt Normal file
View File

@ -0,0 +1,6 @@
bedroom
chair
something
tree
apple
window

BIN
338/graphical-hangman.zip Normal file

Binary file not shown.

137
338/hangman/Hangman.java Normal file
View File

@ -0,0 +1,137 @@
import java.util.Scanner;
public class Hangman {
// addes a new found character to the string
public static void newChar(String source, char[] target, char c) {
// putting a new char into the target string
for(int i =0; i<source.length(); i++) {
// only pass through the matches in the string
if(source.charAt(i) == c) {
target[i] = c;
}
}
}
// deals with normal guesses
// only given good input
public static void guessHandler(char c, char[] prog, String source) {
boolean found = false;
// looking to see where we need to change the progressive array
for(int i =0;i<source.length();i++) {
if(source.charAt(i) == c) {
prog[i] = c;
found = true;
}
}
if(found) {
System.out.println(c+ " is in the word");
System.out.println("Progress so far: " + new String(prog));
}
else {
System.out.println(c+ " is not in the word");
}
}
// checks if we're given an alphabet character
public static boolean alphaChar(char c) {
if(c < 'A') {
return false;
}
if(c>'Z' && c<'a') {
return false;
}
if(c > 'z') {
return false;
}
return true;
}
// Returns a new character to put into the word
public static char useHint(String prev, String full) {
for(int i =0;i<prev.length()-1;i++) {
if(full.contains(prev.charAt(i) + "")) {
continue;
}
else {
return prev.charAt(i);
}
}
return '\0';
}
public static void main(String[] args) {
System.out.println("\tHangman");
System.out.print("Enter a word: ");
// read stdin
Scanner scan = new Scanner(System.in);
String raw = scan.nextLine();
// keep track of the player's progression
char[] progArr = new char[raw.length()];
StringBuilder guessChars = new StringBuilder();
// ignore spaces by setting them to '#'
for(int i =0;i<raw.length();i++) {
if(raw.charAt(i) == ' ') {
progArr[i] = '#';
}
else {
progArr[i] = '_';
}
}
// bannering
System.out.println("So far the word is :" + new String(progArr));
System.out.println("You have 4 guesses remaining.");
int guessCount = 4;
// Dealing with main game loop here
while(true) {
System.out.print("Enter either 1 for guessing or 2 for hint: ");
String attempt = scan.nextLine();
if(attempt.contains("1")) {
System.out.print("Enter your guess: ");
attempt = scan.nextLine();
// if we have good input we can go through a normal check
if(alphaChar(attempt.charAt(0))) {
guessHandler(attempt.charAt(0), progArr, raw);
guessChars.append(attempt.charAt(0));
System.out.println("Characters used: " + guessChars.toString());
}
}
else if(attempt.contains("2")) {
if(guessCount == 0) {
System.out.println("No more guesses/hints left!");
continue;
}
guessCount--;
System.out.println(guessCount + " guesses left.");
// find a fresh character
char hint = useHint(guessChars.toString(), raw);
guessHandler(hint, progArr, raw);
// adjust the running track
guessChars.append(hint);
System.out.println("Characters used: " + guessChars.toString());
}
else {
System.out.println("Invalid input");
}
// exit condition
if(new String(progArr).contains("_")) {
if(progArr.toString().contains("_")) {
continue;
}
else {
System.out.println("Congrats!");
return;
}
}
}
}
}

78
338/homework5/App.java Normal file
View File

@ -0,0 +1,78 @@
/*
Author: Alejandro Santillana
Description: Builds a basic school data tracker
keeps track of students and what course they are enrolled in as well as what courses
are offered by the school.
Course information is also available
Input is read from file
*/
public class App {
public static void main(String[] args) {
String dataFile1 = "data1.txt";
String dataFile2 = "data2.txt";
// course reference for demo purposes
Course course1;
Student student1;
// first we'll read in some data
System.out.println("===== Read Data 1 =====");
School SCD = new School("CSUMB");
// get all basic info about the SCD
SCD.readData(dataFile1);
System.out.println("\n===== School Info 1 =====");
SCD.schoolInfo();
// round 2 of adding info to the SCD
System.out.println("\n===== Read Data 2 =====");
SCD.readData(dataFile2);
System.out.println("\n===== School Info 2 =====");
SCD.schoolInfo();
// we'll now add some new instructors
SCD.addInstructor(700, "E. Tao", "tao@csumb.edu", "777-777-1234");
SCD.addCourse(300, "CST300 ProSem", 700, "BIT110");
SCD.addCourse(231, "CST231 Intro C++", 100, "BIT104");
// examples of bad courses to add
System.out.println("\n===== Failed Course Addition =====");
SCD.addCourse(306, "CST306 GUI Dev", 250, "BIT120");
SCD.addCourse(499, "CST499 iOS Dev", 150, "BIT104");
System.out.println("\n===== Detailed Course Info =====");
SCD.courseInfo(306);
// updateing a courses location
course1 = SCD.getCourse(205);
course1.updateLocation("Library 104");
// checking some courses' information
System.out.println("\n===== Detailed Course Info 2 =====");
SCD.courseInfo(205);
System.out.println("\n===== Detailed Course Info 4 =====");
SCD.courseInfo();
// adding a student (valid this time)
SCD.addStudent(5555, "Chris Watson", 205, 85.50f, "B");
System.out.println("\n===== Detailed Course Info 5 =====");
SCD.courseInfo(205);
student1 = SCD.getStudentInfo(7777);
// student info
System.out.println("\n===== Detailed Student Info =====");
System.out.println(student1);
System.out.println("\n===== Detailed Student Info 2 =====");
System.out.println(SCD.getStudentInfo(7777));
SCD.graduateStudent(5555);
System.out.println("\n===== Detailed Course Info 6 =====");
SCD.courseInfo(205);
SCD.graduateStudent(5555);
System.out.println("\n===== Good Job! Bye! =====");
}
}

25
338/homework5/Course.java Normal file
View File

@ -0,0 +1,25 @@
public class Course {
public int id;
public String title;
public int instructorID;
public String location;
public int studentCount;
public Course (int id, String title, int instructorID, String location) {
this.id = id;
this.title = title;
this.instructorID = instructorID;
this.location = location;
this.studentCount = 0;
}
// updates the room location of a given course ex. BIT-104 to BIT-110
public void updateLocation(String newLocation) {
this.location = newLocation;
}
public String toString() {
return this.id + " - " + this.title;
}
}

8
338/homework5/Grade.java Normal file
View File

@ -0,0 +1,8 @@
public class Grade {
public float num_grade;
public String str_grade;
public Grade(float num_grade, String str_grade) {
this.num_grade = num_grade;
this.str_grade = str_grade;
}
}

View File

@ -0,0 +1,15 @@
public class Instructor {
public int id;
public String name;
public String email;
public String phone;
public Instructor(int id , String name, String email, String phone) {
this.id = id;
this.name = name;
this.email = email;
this.phone = phone;
}
public String toString() {
return this.name;
}
}

279
338/homework5/School.java Normal file
View File

@ -0,0 +1,279 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
// NOTE: there will probably only be one instance of a school object ever
public class School {
private ArrayList<Instructor> instructorList;
private ArrayList<Course> courseList;
private ArrayList<Student> studentList;
private String name;
public School(/*String file,*/ String schoolName) {
this.instructorList = new ArrayList<Instructor>();
this.courseList = new ArrayList<Course>();
this.studentList = new ArrayList<Student>();
this.name = schoolName;
//readData(file);
}
public void readData(String filename) {
try {
BufferedReader reader = new BufferedReader(new FileReader(filename));
// first line is how many instructors we want to add
int inst_count = Integer.parseInt(reader.readLine());
for(int i =0;i<inst_count;i++) {
// now we shold begin to populate out instructor list
String[] data = reader.readLine().split(",");
int tmp_id = Integer.parseInt(data[0]);
// ignoring the return value as those custom messages are in the method itself
this.addInstructor(tmp_id, data[1], data[2],data[3]);
}
// next line should be number of courses to add
int course_count = Integer.parseInt(reader.readLine());
for(int i =0;i<course_count;i++) {
String[] data = reader.readLine().split(",");
int tmp_id = Integer.parseInt(data[0]);
int inst_id = Integer.parseInt(data[2]);
this.addCourse(tmp_id, data[1], inst_id, data[3]);
}
// finally the amount of students we want to add is next
int student_count = Integer.parseInt(reader.readLine());
for(int i =0;i<student_count;i++) {
// parse items from the current line
String[] data = reader.readLine().split(",");
int stud_id = Integer.parseInt(data[0]);
int cour_id = Integer.parseInt(data[2]);
float fl_grade = Float.parseFloat(data[3]);
// attempt to add the student
this.addStudent(stud_id, data[1], cour_id, fl_grade, data[4]);
}
System.out.println("Done.");
}
catch(IOException e) {
e.printStackTrace();
}
}
public boolean addInstructor(int id, String name, String email, String phone) {
// make sure that the new instructor isn't already in the system
for(Instructor i : this.instructorList) {
if(id == i.id) {
System.out.println("Instructor ID already in use");
return false;
}
}
Instructor new_inst = new Instructor(id, name, email, phone);
instructorList.add(new_inst);
return true;
}
public boolean addCourse(int id, String title, int instructorID, String location) {
// make sure we don't the same course twice
for(Course c : this.courseList) {
if(c.id == id) {
System.out.println("Course addition failed Course number already used.");
return false;
}
}
// check if the instructor exists
boolean instructorExists = false;
for(Instructor i : this.instructorList) {
if(i.id == instructorID) {
instructorExists = true;
}
}
if(!instructorExists) {System.out.println("Course addition failed Non-existing instructor.");}
// check the instructor
Course new_course = new Course(id, title, instructorID, location);
courseList.add(new_course);
return true;
}
public int courseEnrolled(int id) {
// Helper function which simply counts up how many people are enrolled in a given cuorse
int count = 0;
for(Course i : this.courseList) {
if(i.id == id) {
count++;
}
}
return count;
}
public String getInstructor(int id) {
// find the instructor name given an id
for(Instructor i : this.instructorList) {
if(i.id == id) {
return i.name;
}
}
return "Not Found";
}
public float courseAverage(int id) {
// gets average of all the students grades for a given course by id
float sum = 0;
int count = 0;
for(Student s : this.studentList) {
for(Integer i : s.grades.keySet()) {
if(i == id) {
sum += s.grades.get(id).num_grade;
count++;
}
}
}
if(count == 0) {
return 0.00f;
}
return sum / (float)count;
}
public void courseInfo(int id) {
boolean found = false;
// look for the course given by the id
for(Course i : this.courseList) {
found = true;
if(i.id == id) {
System.out.println("Course number: " + i.id);
System.out.println("Instructor: "+ this.getInstructor(i.instructorID));
System.out.println("Course title: " + i.title);
System.out.println("Room: " + i.location);
System.out.println("Total enrolled: " + this.courseEnrolled(id));
System.out.println("Course average: " + this.courseAverage(id));
}
}
if(!found) {
System.out.println("Course not found: [id = " + id + "]");
}
}
public void courseInfo() {
System.out.println("Number of courses: " + this.courseList.size());
for(Course c : this.courseList) {
System.out.println(c.id + ": " + this.courseEnrolled(c.id) + " enrolled");
}
}
public Course getCourse(int id) {
for(int i =0;i<this.courseList.size();i++) {
if(this.courseList.get(i).id == id) {
return this.courseList.get(i);
}
}
return null;
}
public boolean courseEmpty(int courseID) {
for(Student s : this.studentList) {
if(s.grades.get(courseID) != null) {
return true;
}
}
return true;
}
public boolean deleteCourse(int id) {
for(int i =0;i<this.courseList.size();i++) {
if(this.courseEmpty(this.courseList.get(i).id)) {
if(this.courseList.get(i).id == id) {
this.courseList.remove(i);
return true;
}
}
}
return false;
}
public boolean addStudent(int id, String name, int courseID, float floatGrade, String letterGrade) {
for(Student i : this.studentList) {
if(i.id == id) {
// attempt to regitser the student in case they're trying to add a new course
// this method should also give us proper error msgs about registering
if(this.register(id, courseID, floatGrade, letterGrade)) {
return true;
}
return false;
}
}
// check if the course even exists at all
boolean cFound = false;
for(Course c : this.courseList) {
if(c.id == courseID) {
cFound = true;
}
}
if(!cFound) {
System.out.println("Course does not exist");
return false;
}
// finally we can add the student into the system
// this is assuming we didn't register them earlier
Student new_student = new Student(id, name, courseID, floatGrade, letterGrade);
studentList.add(new_student);
return true;
}
public Student getStudentInfo(int id) {
for(Student s : this.studentList) {
if(s.id == id) {
return s;
}
}
return null;
}
public boolean graduateStudent(int id) {
// remove the target id from all the courses
Student tmp = getStudentInfo(id);
if(tmp == null) {
System.out.println("Student not found");
return false;
}
tmp.graduate();
return true;
}
public boolean register(int studentID, int courseID, float floatGrade, String letterGrade) {
Student tmp = this.getStudentInfo(studentID);
if(tmp.grades.keySet().contains(courseID)) {
System.out.println("Student already enrolled");
return false;
}
// make sure we don't try to regitster for a course that doesn't exist
if(this.getCourse(courseID) == null) {
return false;
}
// if the student is there but not enrolled in that course then just create a new student with new data
tmp.enroll(courseID, floatGrade, letterGrade);
return true;
}
public void drop(int studentID, int courseID) {
}
public void assign(int instructorID, int courseID) {
}
public void unassign(int instructorID, int courseID) {
}
// basic printout of school infor
public void schoolInfo() {
System.out.println("School name: " + this.name);
// instructors
System.out.println("Instructor info");
for(Instructor i : this.instructorList) {
System.out.println(i.name);
}
// courses
System.out.println("Course Information");
for(Course c : this.courseList) {
System.out.println(c.title);
}
// students
System.out.println("Student Information");
for(Student s : this.studentList) {
// check what courses that student is in
for(Integer i : s.grades.keySet()) {
Course c_rep = this.getCourse(i);
System.out.println(s.name + ": " + c_rep.title);
}
}
}
}

View File

@ -0,0 +1,43 @@
import java.util.HashMap;
import java.util.ArrayList;
public class Student {
public int id;
public String name;
// courseID, grade for that course
public HashMap<Integer, Grade> grades;
public String status;
public Student(int id, String name, int courseId, float floatGrade, String letterGrade) {
this.name = name;
this.id = id;
grades = new HashMap<Integer, Grade>();
grades.put(courseId, new Grade(floatGrade, letterGrade));
// default student status
this.status = "Enrolled";
}
public String toString() {
return "Student number: " + this.id + "\n" +
"Name: " + this.name + "\n" +
"Status: " + this.status;
}
public float averageGrade() {
float sum = 0;
int count = 0;
for(Grade g : this.grades.values()) {
sum += g.num_grade;
count++;
}
return sum/(float)count;
}
public void graduate() {
for(Integer i : this.grades.keySet()) {
// remove from all the courses
this.grades.remove(i);
}
this.status = "Graduated";
}
public void enroll(int courseId, float num_grade, String l_grade) {
grades.put(courseId, new Grade(num_grade, l_grade));
}
}

13
338/homework5/data1.txt Normal file
View File

@ -0,0 +1,13 @@
4
100,Y. Byun,ybyun@csumb.edu,111-111-1111
200,S. Narayanan,sathya@csumb.edu,222-222-2222
300,M. Lara,lara@csumb.edu,333-333-3333
250,S. Bude,bude@csumb.edu,444-123-4567
3
338,CST338 - Software Design,100,BIT 104
205,CST205 - Multimedia Design and Programming,200,BIT 118
306,CST306 - Game Engine Programming,100,BIT 104
3
7777,Alice Otter,338,89.50,B
8888,Bob Otter,205,75.00,C
7777,Alice Otter,306,98.00,A

10
338/homework5/data2.txt Normal file
View File

@ -0,0 +1,10 @@
2
500,G. Bruns,bruns@csumb.edu,555-222-2222
300,O. Doe,doe@csumb.edu,444-333-3333
1
336,CST336 - Internet Programming,300,Library 1010
4
7777,Alice Otter,205,71.00,C
7777,Unknown Otter,205,71.00,C
7777,Alice Otter,310,81.55,B
9999,John Doe,338,89.50,B

8
338/homework5/makefile Normal file
View File

@ -0,0 +1,8 @@
all:
javac App.java Course.java Instructor.java School.java Student.java
run: all
@java App
clean:
rm -f *class

55
338/lab2/can.java Normal file
View File

@ -0,0 +1,55 @@
// Alejandro Santillana
/*
* given an array of int values,
* is there a index in the array where the sum of values[0 .. index]
* is equal to (or balances) the sum of values[index+1 .. length-1]
* look at the examples below
* Your task: design and code the canBalance methods that returns true or false
* the program should be efficient.
* can you solve the problem without using nested loops? 1 loop? 2 loops?
* Then run the program to see if your method works correctly.
*/
public class CanBalance {
public static void main(String[] args) {
boolean r;
r = canBalance(new int[] {1, 1, 1, 2, 1});
System.out.println("canBalance( [1, 1, 1, 2, 1] ) should be true. You returned "+r);
r = canBalance(new int[] {2, 1, 1, 2, 1 });
System.out.println("canBalance( [2, 1, 1, 2, 1]) should be false. You returned "+r);
r = canBalance(new int[] {10, 10});
System.out.println("canBalance( [10,10]) should be true. You returned "+r);
r = canBalance(new int[] {10, 0, 1, -1, 10} );
System.out.println("canBalance([10, 0, 1, -1, 10]) should be true. You returned "+r);
r = canBalance(new int[] { 1});
System.out.println(" should be false. You returned "+r);
r = canBalance(new int[] {2, 1, 1, 1, 1});
System.out.println("canBalance([2, 1, 1, 1, 1]) should be true. You returned "+r);
}
public static boolean canBalance(int[] a) {
int sum_a = 0;
int sub_b = 0;
for(int i =0;i<a.length();i++) {
sum_a += a[i];
sum_b = 0;
for(int j =i+1;j<=a.length();j++) {
sum_b = a[j];
if(sum_b == sum_b) {
return true;
}
}
}
return false;
}
}

33
338/lab2/canbalance.java Normal file
View File

@ -0,0 +1,33 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>POST data</title>
<script type="text/javascript" src="/auth/saml2/sp/../extlib/simplesamlphp/www/resources/post.js"></script>
<link
type="text/css" rel="stylesheet" href="/auth/saml2/sp/../extlib/simplesamlphp/www/resources/post.css" />
</head>
<body>
<noscript>
<p><strong>Note:</strong>
Since your browser does not support JavaScript,
you must press the button below once to proceed.</p>
</noscript>
<form method="post"
action="https://csumb.okta.com/app/csumb_ilearn_1/exkjodlcw31RcSw7R0x7/sso/saml">
<!-- Need to add this element and call click method, because calling
submit() on the form causes failed submission if the form has another
element with name or id of submit.
See: https://developer.mozilla.org/en/DOM/form.submit#Specification -->
<input type="submit" id="postLoginSubmitButton"/>
<input type="hidden" name="SAMLRequest" value="PHNhbWxwOkF1dGhuUmVxdWVzdCB4bWxuczpzYW1scD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOnByb3RvY29sIiB4bWxuczpzYW1sPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6YXNzZXJ0aW9uIiBJRD0iXzY0MGQ2NDIzOThhN2U2MDU4ZGRjNTU2NTVlNmNkZTM5YTUwNjNiOTgyOSIgVmVyc2lvbj0iMi4wIiBJc3N1ZUluc3RhbnQ9IjIwMTktMDItMDhUMDI6MDM6NDNaIiBEZXN0aW5hdGlvbj0iaHR0cHM6Ly9jc3VtYi5va3RhLmNvbS9hcHAvY3N1bWJfaWxlYXJuXzEvZXhram9kbGN3MzFSY1N3N1IweDcvc3NvL3NhbWwiIEFzc2VydGlvbkNvbnN1bWVyU2VydmljZVVSTD0iaHR0cHM6Ly9pbGVhcm4uY3N1bWIuZWR1L2F1dGgvc2FtbDIvc3Avc2FtbDItYWNzLnBocC9pbGVhcm4uY3N1bWIuZWR1IiBQcm90b2NvbEJpbmRpbmc9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpiaW5kaW5nczpIVFRQLVBPU1QiPjxzYW1sOklzc3Vlcj5odHRwczovL2lsZWFybi5jc3VtYi5lZHUvYXV0aC9zYW1sMi9zcC9tZXRhZGF0YS5waHA8L3NhbWw6SXNzdWVyPjxkczpTaWduYXR1cmUgeG1sbnM6ZHM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyMiPgogIDxkczpTaWduZWRJbmZvPjxkczpDYW5vbmljYWxpemF0aW9uTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8xMC94bWwtZXhjLWMxNG4jIi8+CiAgICA8ZHM6U2lnbmF0dXJlTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8wNC94bWxkc2lnLW1vcmUjcnNhLXNoYTI1NiIvPgogIDxkczpSZWZlcmVuY2UgVVJJPSIjXzY0MGQ2NDIzOThhN2U2MDU4ZGRjNTU2NTVlNmNkZTM5YTUwNjNiOTgyOSI+PGRzOlRyYW5zZm9ybXM+PGRzOlRyYW5zZm9ybSBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyNlbnZlbG9wZWQtc2lnbmF0dXJlIi8+PGRzOlRyYW5zZm9ybSBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvMTAveG1sLWV4Yy1jMTRuIyIvPjwvZHM6VHJhbnNmb3Jtcz48ZHM6RGlnZXN0TWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8wNC94bWxlbmMjc2hhMjU2Ii8+PGRzOkRpZ2VzdFZhbHVlPlc0Qjdpek05WGE5cWtYeEtMV3IvSEVIRE94WEVxWTlLQXBIZ3RBNG03Mnc9PC9kczpEaWdlc3RWYWx1ZT48L2RzOlJlZmVyZW5jZT48L2RzOlNpZ25lZEluZm8+PGRzOlNpZ25hdHVyZVZhbHVlPkdQZUhqMTRlbWYwWE56cjJEMDhqT2N6WGpLRFJzZlNyZE1VUlBrdDUraTlNZXRzYXBtamZEQ0p6RUFZa3E3TnFHUjF0NVY3L3ZWZW0rYmRiaUxGeUUreXRKeldrSjUzRjAvUkJ0TUJwVUdTVUVjYjZadGlBSXJpZzlkTDU5eE1PK3Z0T2xzd0s4NVprdXhNbHJKQjBRdVdpVVVpVTFMSHFnUUdOMHkwNS9UYUg3Zzl6V3RZWlRESFF5OEMxOEJYTENZY3h4dGh2NnVBNnM1QVB1SGx4S0poL3hhZXMvQ21ZZGlERGNBWlg1cWJZZDU5NjJrOSt1Q0V3emhFVHRyVFhjd0w1MGxQS29MRDVTcFJqUk54SHIxaU5jbzF5bDVyemtseExhT0dBb21TczYxdzVVNkNFbkNTRjh0a3kwakpOaVFHR3ZWdVNmNXM2cXhnWlgwNHNFQT09PC9kczpTaWduYXR1cmVWYWx1ZT4KPGRzOktleUluZm8+PGRzOlg1MDlEYXRhPjxkczpYNTA5Q2VydGlmaWNhdGU+TUlJRC9UQ0NBdVdnQXdJQkFnSUJBREFOQmdrcWhraUc5dzBCQVFVRkFEQ0JtREVQTUEwR0ExVUVBd3dHWlZSb2FXNXJNUXN3Q1FZRFZRUUdFd0pWVXpFdk1DMEdDU3FHU0liM0RRRUpBUllnYW1WemMyVXVjMkZtY21GdVFHVjBhR2x1YTJWa2RXTmhkR2x2Ymk1amIyMHhFakFRQmdOVkJBY01DVUpoYkhScGJXOXlaVEVQTUEwR0ExVUVDZ3dHWlZSb2FXNXJNUkV3RHdZRFZRUUlEQWhOWVhKNWJHRnVaREVQTUEwR0ExVUVDd3dHWlZSb2FXNXJNQjRYRFRFNE1EVXhPREUxTWpnd01Wb1hEVEk0TURVeE5URTFNamd3TVZvd2daZ3hEekFOQmdOVkJBTU1CbVZVYUdsdWF6RUxNQWtHQTFVRUJoTUNWVk14THpBdEJna3Foa2lHOXcwQkNRRVdJR3BsYzNObExuTmhabkpoYmtCbGRHaHBibXRsWkhWallYUnBiMjR1WTI5dE1SSXdFQVlEVlFRSERBbENZV3gwYVcxdmNtVXhEekFOQmdOVkJBb01CbVZVYUdsdWF6RVJNQThHQTFVRUNBd0lUV0Z5ZVd4aGJtUXhEekFOQmdOVkJBc01CbVZVYUdsdWF6Q0NBU0l3RFFZSktvWklodmNOQVFFQkJRQURnZ0VQQURDQ0FRb0NnZ0VCQU5hckN2ZWR3dWlIbVlXWXFQN09kb3FRdDN2SGZsb1hsL01keHVMcEE5Z1VEWVJYWUkyZ3V4Zy9iR3Q1TkVuVCtFRzVucFZZS2pGUFBpU0Nsait6ckNtaFl0MzM4SEw0N2V5QUZ5ZWlIbU9sbklDTlJFbGFIK1lTMG9SRVBiaDZNV2Y4cUpEVlJrQjNBVEJJeUFwdFVicW9GOVhIMDFOb3RWU3N2MEg2bWhrb3FOb3BSSGN0N1RMY3hVRUpZdWNmWEhpdmZJS1gzQzI5Y2lXNjlvVWdkTm85bDJNc1NTanBzaE1EbS82Z3FjYVExL1NlUFN5ak50UHp3dTNGUnh5NXNoSVYvQ00vZDJCczdZWjJVZ0JlNWtNeXQ3RU1XbUdJOTMra01odGxMaEtNMTVTMUZMcElzR2RDLzJOZ0VCUHF4S09DNDhXNFF3S2RCazJRMVE1NVc2MENBd0VBQWFOUU1FNHdIUVlEVlIwT0JCWUVGT1lRV3llYlpXTFpVM0hMREFjVWtRajdydTNtTUI4R0ExVWRJd1FZTUJhQUZPWVFXeWViWldMWlUzSExEQWNVa1FqN3J1M21NQXdHQTFVZEV3UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUZCUUFEZ2dFQkFJV0d6U3RwWXdVU21IQ3loK2NPV1BrQlI5YzBrM2xUbkVFVmJ6SzhtdnIzWUd6Zy9KQUZoeTZuRDFGNnlQN0Z0MzdMQkRDZ2ZDK2xWV3F5bVU3SFNDOHhNNXkzeHpERlkvalR5R0pDVHV5bXQ2Qk5MR3ZlaHl2cWY0V25kSmRkUXIweTZxL09wNDRLQTlISG5rMENFQk94Z1p1UnJsMmp1VW9abmlGK3RZTW5ib3pyQXgyekxsVnE4ZEttMkVnb0Y1a0ZBMjNYZE9hczBDaHF1S3Z5Y3NWU3JUb0tyNjBjNlcwdlBBZGJ2bWd0MTM3U0pHMTJWR2g2d0M2NW5tRnpKcVRXeE5WbjRDRkNlZ3czWDN3aHgyYlJqRlBYYVFkdEJMMWQzNFNhR09Gb1RNYzUxTUV2M1R0QStIeGVLSkRlRTdDNmhHTzc0RlhIMmtMRFE2TDNzcE09PC9kczpYNTA5Q2VydGlmaWNhdGU+PC9kczpYNTA5RGF0YT48L2RzOktleUluZm8+PC9kczpTaWduYXR1cmU+PHNhbWxwOk5hbWVJRFBvbGljeSBGb3JtYXQ9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjEuMTpuYW1laWQtZm9ybWF0OnVuc3BlY2lmaWVkIiBBbGxvd0NyZWF0ZT0idHJ1ZSIvPjwvc2FtbHA6QXV0aG5SZXF1ZXN0Pg==" /><input type="hidden" name="RelayState" value="https://ilearn.csumb.edu/pluginfile.php/1114706/mod_resource/content/1/CanBalance.java" />
<noscript>
<button type="submit" class="btn">Submit</button>
</noscript>
</form>
</body>
</html>

BIN
338/lab5/build/h1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

BIN
338/lab5/build/h2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
338/lab5/build/h3.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
338/lab5/build/h4.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
338/lab5/build/h5.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
338/lab5/build/h6.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
338/lab5/build/h7.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,112 @@
package hangman;
/**
* Game contains the logic for game of hangman.
*
*/
public class Game {
protected String word;
protected int remaining_guesses;
protected StringBuffer display;
protected String correctGuess;
protected String badGuess;
/**
* Game constructor
* @param word - the word to be guessed
* @param guesses - number of incorrect guesses allowed
*/
public Game(String word, int guesses) {
this.word = word;
remaining_guesses = guesses;
correctGuess = "";
badGuess = "";
display = new StringBuffer();
for (int i = 0; i < word.length(); i++) {
char c = word.charAt(i);
if (Character.isLetter(c)) {
display.append("_");
} else {
display.append("#");
}
display.append(" ");
}
}
public String getWord() {
return word;
}
public int getRemainingGuesses() {
return remaining_guesses;
}
public String getDisplay() {
return display.toString();
}
/* return code from processGuess */
public static final int GOOD = 1;
public static final int BAD = 2;
public static final int WON = 3;
public static final int LOST = 4;
public static final int REPEAT_GOOD_GUESS = 5;
public static final int REPEAT_BAD_GUESS = 6;
/**
*
* @param c - the letter guessed
* @return code
*/
public int processGuess(char c) {
if (correctGuess.indexOf(c) >= 0) {
return REPEAT_GOOD_GUESS;
}
if (badGuess.indexOf(c) >= 0) {
remaining_guesses -= 1;
if (remaining_guesses <= 0 && display.indexOf("_") >= 0) {
return LOST;
} else {
return REPEAT_BAD_GUESS;
}
} else {
boolean found = false;
for (int i = 0; i < word.length(); i++) {
if (c == word.charAt(i)) {
found = true;
correctGuess += c;
display.replace(2 * i, 2 * i + 1, word.substring(i, i + 1));
}
}
if (!found) {
remaining_guesses -= 1;
badGuess += c;
if (remaining_guesses <= 0 && display.indexOf("_") >= 0) {
return LOST;
} else {
return BAD;
}
}
}
if (display.indexOf("_") < 0) {
return WON;
} else {
return GOOD;
}
}
/**
* user asks for a hint.
* @return code WON, LOST or GOOD.
*/
public int doHint() {
int k = display.indexOf("_");
char c = word.charAt(k / 2);
int rc = processGuess(c);
return rc;
}
}

View File

@ -0,0 +1,156 @@
package hangman;
import java.io.*;
import java.util.ArrayList;
import java.util.Random;
import java.util.Scanner;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.TextField;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class Hangman extends Application {
Image[] images = new Image[7];
ArrayList<String> words;
Game g;
ImageView imageView;
Text text1;
Text text2;
TextField textField;
@Override
public void start(Stage stage) throws Exception {
words = new ArrayList<String>();
readFile();
g = new Game(pickRandomWord(), 6);
try {
//load image files
images[0] = new Image(new FileInputStream("./h1.gif"));
images[1] = new Image(new FileInputStream("./h2.gif"));
images[2] = new Image(new FileInputStream("./h3.gif"));
images[3] = new Image(new FileInputStream("./h4.gif"));
images[4] = new Image(new FileInputStream("./h5.gif"));
images[5] = new Image(new FileInputStream("./h6.gif"));
images[6] = new Image(new FileInputStream("./h7.gif"));
} catch (Exception e) {
System.out.println("Error. " + e.getMessage());
System.exit(0);
}
imageView = new ImageView(images[0]);
text1 = new Text("Guess a letter or ask for hint.");
text2 = new Text(g.getDisplay());
textField = new TextField();
textField.setOnAction(new GameController());
VBox vbox = new VBox(10);
vbox.getChildren().addAll(imageView, text1, text2, textField);
//Creating a scene object
Scene scene = new Scene(vbox, 250, 350);
stage.setTitle("Play Hangman");
stage.setScene(scene);
stage.show();
}
public class GameController implements EventHandler<ActionEvent> {
@Override
public void handle(ActionEvent ae) {
String user_input = textField.getText();
//DEBUG System.out.println(user_input);
if (user_input.length() == 0) {
text1.setText("Enter a single letter or enter hint.");
text2.setText(g.getDisplay());
textField.setText("");
} else if (user_input.equalsIgnoreCase("hint")) {
int rc = g.doHint();
imageView.setImage(images[6 - g.getRemainingGuesses()]);
if (rc == Game.WON) {
text1.setText("You won!");
text2.setText(g.getDisplay());
textField.setText("");
} else if (rc == Game.LOST) {
text1.setText("");
text2.setText("Game over. The word was: " + g.getWord());
textField.setText("");
} else {
text1.setText("Enter a guess or hint.");
text2.setText(g.getDisplay());
textField.setText("");
}
} else {
char c = user_input.charAt(0);
int rc = g.processGuess(c);
switch (rc) {
case Game.BAD:
text1.setText("No " + c + " in the word. " + g.getRemainingGuesses() + " attempts left.");
textField.setText("");
imageView.setImage(images[6 - g.getRemainingGuesses()]);
break;
case Game.GOOD:
text1.setText("Yes. There is a " + c + " in the word.");
text2.setText(g.getDisplay());
textField.setText("");
break;
case Game.LOST:
text1.setText("That was your last guess. Game Over");
text2.setText("Word was: " + g.getWord());
imageView.setImage(images[6]);
textField.setText("");
break;
case Game.WON:
text1.setText("You won!");
text2.setText(g.getDisplay());
textField.setText("");
break;
case Game.REPEAT_GOOD_GUESS:
text1.setText("You already guessed that letter.");
text2.setText(g.getDisplay());
textField.setText("");
case Game.REPEAT_BAD_GUESS:
text1.setText("You already guessed that letter.");
text2.setText(g.getDisplay());
textField.setText("");
imageView.setImage(images[6 - g.getRemainingGuesses()]);
}
}
}
}
public static void main(String[] args) {
launch(args);
}
public void readFile(){
try {
File f = new File("words.txt");
Scanner infile = new Scanner(f);
while (infile.hasNext()){
words.add(infile.nextLine().trim());
}
infile.close();
}catch (Exception e){
System.out.println("Error exception. "+e.getMessage());
System.exit(0);
}
}
public String pickRandomWord() {
int k = new Random().nextInt(words.size());
return words.get(k);
}
}

View File

@ -0,0 +1,18 @@
cc=~/Downloads/jdk-11.0.2/bin/javac
fxlib=--module-path /home/shockrah/Downloads/javafx-sdk-11.0.2/lib
ctrl=--add-modules javafx.controls
env=~/Downloads/jdk-11.0.2/bin/java
jfile=Game.java Hangman.java
cfile="Hangman"
default:
# takes a java file as entry to build
$(cc) $(fxlib) $(jfile) $(ctr)
# ouchie
run:
$(env) $(fxlib) $(ctrl) $(cfile)
clean:
rm -f *class

View File

@ -0,0 +1,2 @@
[ -z $1 ] && echo "no target" && exit 1
java --module-path /home/shockrah/Downloads/javafx-sdk-11.0.2/lib --add-modules javafx.controls $1

1
338/lab5/build/make.sh Normal file
View File

@ -0,0 +1 @@
javac --module-path /home/shockrah/Downloads/javafx-sdk-11.0.2/lib $1 --add-modules javafx.controls

2
338/lab5/build/run Executable file
View File

@ -0,0 +1,2 @@
[ -z $1 ] && echo "no target" && exit 1
java --module-path /home/shockrah/Downloads/javafx-sdk-11.0.2/lib --add-modules javafx.controls $1

2
338/lab5/build/run.sh Normal file
View File

@ -0,0 +1,2 @@
[ -z $1 ] && echo "no target" && exit 1
java --module-path /home/shockrah/Downloads/javafx-sdk-11.0.2/lib --add-modules javafx.controls $1

53
338/lab5/source/build.xml Normal file
View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?><!-- You may freely edit this file. See commented blocks below for --><!-- some examples of how to customize the build. --><!-- (If you delete it and reopen the project it will be recreated.) --><!-- By default, only the Clean and Build commands use this build script. --><project name="javafxsample" default="default" basedir="." xmlns:fx="javafx:com.sun.javafx.tools.ant">
<description>Builds, tests, and runs the project javafxsample.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. Those of them relevant for JavaFX project are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-jfx-jar: called before FX SDK specific <fx:jar> task
-post-jfx-jar: called after FX SDK specific <fx:jar> task
-pre-jfx-deploy: called before FX SDK specific <fx:deploy> task
-post-jfx-deploy: called after FX SDK specific <fx:deploy> task
-pre-jfx-native: called just after -pre-jfx-deploy if <fx:deploy> runs in native packaging mode
-post-jfx-native: called just after -post-jfx-deploy if <fx:deploy> runs in native packaging mode
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting a HTML postprocessor after javaFX SDK deployment:
<target name="-post-jfx-deploy">
<basename property="jfx.deployment.base" file="${jfx.deployment.jar}" suffix=".jar"/>
<property name="jfx.deployment.html" location="${jfx.deployment.dir}${file.separator}${jfx.deployment.base}.html"/>
<custompostprocess>
<fileset dir="${jfx.deployment.html}"/>
</custompostprocess>
</target>
Example of calling an Ant task from JavaFX SDK. Note that access to JavaFX SDK Ant tasks must be
initialized; to ensure this is done add the dependence on -check-jfx-sdk-version target:
<target name="-post-jfx-jar" depends="-check-jfx-sdk-version">
<echo message="Calling jar task from JavaFX SDK"/>
<fx:jar ...>
...
</fx:jar>
</target>
For more details about JavaFX SDK Ant tasks go to
http://docs.oracle.com/javafx/2/deployment/jfxpub-deployment.htm
For list of available properties check the files
nbproject/build-impl.xml and nbproject/jfx-impl.xml.
-->
</project>

View File

@ -0,0 +1,4 @@
#Wed, 20 Feb 2019 12:05:41 -0800
C\:\\Users\\wisne\\Documents\\NetBeansProjects\\javafxsample=

View File

@ -0,0 +1,375 @@
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="5" failures="0" hostname="DESKTOP-JSCKJ80" name="hangman.GameTest" skipped="0" tests="5" time="0.051" timestamp="2019-02-20T20:05:42">
<properties>
<property name="netbeans.autoupdate.country" value="US" />
<property name="javafx.binarycss" value="false" />
<property name="ant.file.type.hangmanfx-impl" value="file" />
<property name="javac.test.classpath" value="C:\Program Files\Java\jdk1.8.0_181\jre/lib/javaws.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/deploy.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/plugin.jar:build/classes:C:\Program Files\NetBeans 8.1\platform\modules\ext\junit-4.12.jar:C:\Program Files\NetBeans 8.1\platform\modules\ext\hamcrest-core-1.3.jar" />
<property name="manifest.custom.codebase" value="*" />
<property name="javac.includes" value="hangman/GameTest.java" />
<property name="ant.core.lib" value="C:\Program Files\NetBeans 8.1\extide\ant\lib\ant.jar" />
<property name="javadoc.windowtitle" value="" />
<property name="javafx.preloader.enabled" value="false" />
<property name="user.dir" value="C:\Users\wisne\Documents\NetBeansProjects\javafxsample" />
<property name="java.vm.version" value="25.181-b13" />
<property name="libs.MySQLDriver.classpath" value="C:\Program Files\NetBeans 8.1\ide\modules\ext\mysql-connector-java-5.1.23-bin.jar" />
<property name="libs.eclipselinkmodelgen.src" value="" />
<property name="javadoc.notree" value="false" />
<property name="netbeans.autoupdate.version" value="1.23" />
<property name="javac.profile.cmd.line.arg" value="" />
<property name="jdk.home" value="C:\Program Files\Java\jdk1.8.0_181" />
<property name="libs.javac-api.src" value="" />
<property name="javafx.enabled" value="true" />
<property name="javadoc.noindex" value="false" />
<property name="libs.jpa2-persistence.classpath" value="C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\hibernate-jpa-2.1-api-1.0.0.Final.jar" />
<property name="sun.os.patch.level" value="" />
<property name="auxiliary.org-netbeans-modules-projectapi.issue214819_5f_fx_5f_enabled" value="true" />
<property name="java.vm.specification.name" value="Java Virtual Machine Specification" />
<property name="nb.show.statistics.ui" value="usageStatisticsEnabled" />
<property name="netbeans.autoupdate.variant" value="" />
<property name="have.tests" value="true" />
<property name="org.xml.sax.driver" value="com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser" />
<property name="libs.hamcrest.classpath" value="C:\Program Files\NetBeans 8.1\platform\modules\ext\hamcrest-core-1.3.jar" />
<property name="libs.javac-api.javadoc" value="" />
<property name="os.name" value="Windows 10" />
<property name="test.class" value="hangman.GameTest" />
<property name="libs.beans-binding.classpath" value="C:\Program Files\NetBeans 8.1\java\modules\ext\beansbinding-1.2.1.jar" />
<property name="ap.proc.none.internal" value="" />
<property name="libs.JWSAntTasks.maven-pom" value="" />
<property name="libs.testng.src" value="" />
<property name="javafx.preloader.project.path" value="" />
<property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/" />
<property name="javafx.preloader.type" value="none" />
<property name="libs.jaxb.maven-pom" value="" />
<property name="os.arch" value="amd64" />
<property name="libs.eclipselink.src" value="" />
<property name="user.name" value="wisne" />
<property name="copylibs.rebase" value="true" />
<property name="libs.swing-layout.maven-pom" value="" />
<property name="sun.java.command" value="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner hangman.GameTest skipNonTests=false filtertrace=true haltOnError=false haltOnFailure=false showoutput=true outputtoformatters=true logfailedtests=true threadid=0 logtestlistenerevents=true formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,C:\Users\wisne\Documents\NetBeansProjects\javafxsample\build\test\results\TEST-hangman.GameTest.xml crashfile=C:\Users\wisne\Documents\NetBeansProjects\javafxsample\build\junitvmwatcher5728162905230135902.properties propsfile=C:\Users\wisne\Documents\NetBeansProjects\javafxsample\build\junit1001895532739290321.properties" />
<property name="build.classes.dir" value="build/classes" />
<property name="netbeans.accept_license_class" value="org.netbeans.license.AcceptLicense" />
<property name="build.sysclasspath" value="ignore" />
<property name="ap.supported.internal" value="true" />
<property name="java.failonerror" value="true" />
<property name="libs.jaxws21.javadoc" value="C:\Program Files\NetBeans 8.1\java\docs\jaxws-api-doc.zip" />
<property name="javafx.run.width" value="800" />
<property name="includes" value="**" />
<property name="user.country" value="US" />
<property name="manifest.file" value="manifest.mf" />
<property name="javadoc.encoding" value="UTF-8" />
<property name="javac.classpath" value="C:\Program Files\Java\jdk1.8.0_181\jre/lib/javaws.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/deploy.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/plugin.jar" />
<property name="libs.spring-framework400.classpath" value="C:\Program Files\NetBeans 8.1\ide\modules\org-apache-commons-logging.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\cglib-2.2.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-aop-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-aspects-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-beans-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-build-src-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-context-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-context-support-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-core-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-expression-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-framework-bom-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-instrument-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-instrument-tomcat-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-jdbc-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-jms-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-messaging-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-orm-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-oxm-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-test-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-tx-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-web-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-webmvc-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-webmvc-portlet-4.0.1.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-4\spring-websocket-4.0.1.RELEASE.jar" />
<property name="debug-transport" value="dt_shmem" />
<property name="netbeans.home" value="C:\Program Files\NetBeans 8.1\platform" />
<property name="build.compiler.emacs" value="true" />
<property name="javafx.deploy.includeDT" value="true" />
<property name="java.endorsed.dirs" value="C:\Program Files\Java\jdk1.8.0_181\jre\lib\endorsed" />
<property name="pythonplatform.Python_3.7.0.console" value="C:\Users\wisne\AppData\Local\Programs\Python\Python37-32\python.exe" />
<property name="test.includes" value="hangman/GameTest.java" />
<property name="netbeans.dynamic.classpath" value="C:\Program Files\NetBeans 8.1\platform\core\asm-all-5.0.1.jar;C:\Program Files\NetBeans 8.1\platform\core\core-base.jar;C:\Program Files\NetBeans 8.1\platform\core\core.jar;C:\Program Files\NetBeans 8.1\platform\core\org-netbeans-libs-asm.jar;C:\Program Files\NetBeans 8.1\platform\core\org-openide-filesystems-compat8.jar;C:\Program Files\NetBeans 8.1\platform\core\org-openide-filesystems.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\core-base_ja.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\core-base_pt_BR.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\core-base_ru.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\core-base_zh_CN.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\core_ja.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\core_pt_BR.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\core_ru.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\core_zh_CN.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\org-netbeans-libs-asm_ja.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\org-netbeans-libs-asm_pt_BR.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\org-netbeans-libs-asm_ru.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\org-netbeans-libs-asm_zh_CN.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\org-openide-filesystems-compat8_ja.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\org-openide-filesystems-compat8_pt_BR.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\org-openide-filesystems-compat8_ru.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\org-openide-filesystems-compat8_zh_CN.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\org-openide-filesystems_ja.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\org-openide-filesystems_pt_BR.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\org-openide-filesystems_ru.jar;C:\Program Files\NetBeans 8.1\platform\core\locale\org-openide-filesystems_zh_CN.jar;C:\Program Files\NetBeans 8.1\nb\core\org-netbeans-upgrader.jar;C:\Program Files\NetBeans 8.1\nb\core\locale\core_nb.jar;C:\Program Files\NetBeans 8.1\nb\core\locale\core_nb_ja.jar;C:\Program Files\NetBeans 8.1\nb\core\locale\core_nb_pt_BR.jar;C:\Program Files\NetBeans 8.1\nb\core\locale\core_nb_ru.jar;C:\Program Files\NetBeans 8.1\nb\core\locale\core_nb_zh_CN.jar;C:\Program Files\NetBeans 8.1\nb\core\locale\org-netbeans-upgrader_ja.jar;C:\Program Files\NetBeans 8.1\nb\core\locale\org-netbeans-upgrader_pt_BR.jar;C:\Program Files\NetBeans 8.1\nb\core\locale\org-netbeans-upgrader_ru.jar;C:\Program Files\NetBeans 8.1\nb\core\locale\org-netbeans-upgrader_zh_CN.jar" />
<property name="jnlp.enabled" value="false" />
<property name="java.vm.specification.version" value="1.8" />
<property name="libs.hibernate4-support.src" value="" />
<property name="netbeans.productversion" value="NetBeans IDE 8.1 (Build 201510222201)" />
<property name="javafx.preloader.class" value="" />
<property name="libs.jaxws21.src" value="" />
<property name="application.title" value="hangmanfx" />
<property name="python.console.encoding" value="cp0" />
<property name="netbeans.autoupdate.language" value="en" />
<property name="java.vendor" value="Oracle Corporation" />
<property name="jar.index.metainf" value="false" />
<property name="javac.debug" value="true" />
<property name="javadoc.splitindex" value="true" />
<property name="file.separator" value="\" />
<property name="javac.includesfile.binary" value="C:\Users\wisne\Documents\NetBeansProjects\javafxsample\null1696129323" />
<property name="libs.junit_4.maven-pom" value="" />
<property name="javac.test.processorpath" value="C:\Program Files\Java\jdk1.8.0_181\jre/lib/javaws.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/deploy.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/plugin.jar:build/classes:C:\Program Files\NetBeans 8.1\platform\modules\ext\junit-4.12.jar:C:\Program Files\NetBeans 8.1\platform\modules\ext\hamcrest-core-1.3.jar" />
<property name="netbeans.buildnumber" value="201510222201" />
<property name="libs.JWSAntTasks.javadoc" value="" />
<property name="build.generated.sources.dir" value="build/generated-sources" />
<property name="user.variant" value="" />
<property name="libs.eclipselinkmodelgen.classpath" value="C:\Program Files\NetBeans 8.1\java\modules\ext\eclipselink\org.eclipse.persistence.jpa.modelgen_2.5.2.v20140319-9ad6abd.jar" />
<property name="sun.java.launcher" value="SUN_STANDARD" />
<property name="libs.hibernate4-persistencemodelgen.javadoc" value="" />
<property name="libs.jaxb.javadoc" value="C:\Program Files\NetBeans 8.1\ide\docs\jaxb-api-doc.zip" />
<property name="javac.includes.binary" value="C:\Users\wisne\Documents\NetBeansProjects\javafxsample\build\test\classes\hangman\GameTest.class" />
<property name="ant.home" value="C:\Program Files\NetBeans 8.1\extide\ant" />
<property name="libs.junit_4.src" value="C:\Program Files\NetBeans 8.1\platform\docs\junit-4.12-sources.jar" />
<property name="javafx.run.height" value="600" />
<property name="libs.testng.classpath" value="C:\Program Files\NetBeans 8.1\platform\modules\ext\testng-6.8.1-dist.jar" />
<property name="libs.absolutelayout.maven-pom" value="" />
<property name="ant.java.version" value="1.8" />
<property name="java.library.path" value="C:\Program Files\Java\jdk1.8.0_181\jre\bin;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;c:\Program Files\Java\jdk1.8.0_181\bin;C:\RailsInstaller\Git\cmd;C:\RailsInstaller\Ruby2.3.3\bin;C:\Users\wisne\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Users\wisne\AppData\Local\Programs\Python\Python37-32\;C:\Users\wisne\AppData\Local\Microsoft\WindowsApps;." />
<property name="javadoc.author" value="false" />
<property name="java.util.logging.config.class" value="org.netbeans.core.startup.TopLogging" />
<property name="libs.spring-framework400.src" value="" />
<property name="libs.PostgreSQLDriver.src" value="" />
<property name="sun.arch.data.model" value="64" />
<property name="basedir" value="C:\Users\wisne\Documents\NetBeansProjects\javafxsample" />
<property name="libs.jpa20-persistence.maven-pom" value="" />
<property name="jar.compress" value="false" />
<property name="path.separator" value=";" />
<property name="ant.junit.enabletestlistenerevents" value="true" />
<property name="sun.io.unicode.encoding" value="UnicodeLittle" />
<property name="libs.jaxws21.classpath" value="C:\Program Files\NetBeans 8.1\ide\modules\ext\jaxb\jaxb-impl.jar;C:\Program Files\NetBeans 8.1\ide\modules\ext\jaxb\jaxb-xjc.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\jaxws22\FastInfoset.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\jaxws22\gmbal-api-only.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\jaxws22\ha-api.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\jaxws22\javax.mail_1.4.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\jaxws22\jaxws-rt.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\jaxws22\jaxws-tools.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\jaxws22\management-api.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\jaxws22\mimepull.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\jaxws22\policy.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\jaxws22\saaj-impl.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\jaxws22\stax-ex.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\jaxws22\stax2-api.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\jaxws22\streambuffer.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\jaxws22\woodstox-core-asl.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\jaxws22\api\jaxws-api.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\jaxws22\api\jsr181-api.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\jaxws22\api\javax.annotation.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\jaxws22\api\saaj-api.jar;C:\Program Files\NetBeans 8.1\ide\modules\ext\jaxb\activation.jar;C:\Program Files\NetBeans 8.1\ide\modules\ext\jaxb\api\jaxb-api.jar;C:\Program Files\NetBeans 8.1\ide\modules\ext\jaxb\api\jsr173_1.0_api.jar" />
<property name="compile.on.save" value="true" />
<property name="apple.awt.graphics.UseQuartz" value="true" />
<property name="user.language" value="en" />
<property name="testng.mode" value="testng" />
<property name="libs.JAXB-ENDORSED.maven-pom" value="" />
<property name="libs.eclipselink.maven-pom" value="" />
<property name="application.vendor" value="wisne" />
<property name="test.binaryincludes" value="&lt;nothing&gt;" />
<property name="manifest.available" value="true" />
<property name="libs.spring-framework300.maven-pom" value="" />
<property name="run.test.classpath" value="C:\Program Files\Java\jdk1.8.0_181\jre/lib/javaws.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/deploy.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/plugin.jar:build/classes:C:\Program Files\NetBeans 8.1\platform\modules\ext\junit-4.12.jar:C:\Program Files\NetBeans 8.1\platform\modules\ext\hamcrest-core-1.3.jar:build/test/classes" />
<property name="ant.project.invoked-targets" value="test-single" />
<property name="test.binaryexcludes" value="" />
<property name="libs.swing-layout.javadoc" value="C:\Program Files\NetBeans 8.1\platform\docs\swing-layout-1.0.4-doc.zip" />
<property name="sun.java2d.dpiaware" value="true" />
<property name="libs.hibernate4-persistence.maven-pom" value="" />
<property name="https.nonProxyHosts" value="localhost|127.0.0.1|DESKTOP-JSCKJ80" />
<property name="libs.PostgreSQLDriver.maven-pom" value="" />
<property name="java.class.version" value="52.0" />
<property name="libs.hibernate4-persistencemodelgen.maven-pom" value="" />
<property name="libs.eclipselink.javadoc" value="C:\Program Files\NetBeans 8.1\java\modules\ext\docs\javax.persistence-2.1.0-doc.zip" />
<property name="user.properties.file" value="C:\Users\wisne\AppData\Roaming\NetBeans\8.1\build.properties" />
<property name="runtime.encoding" value="UTF-8" />
<property name="javafx.rebase.libs" value="false" />
<property name="libs.javac-api.maven-pom" value="" />
<property name="file.encoding.pkg" value="sun.io" />
<property name="sun.cpu.endian" value="little" />
<property name="libs.JAXB-ENDORSED.javadoc" value="" />
<property name="libs.JWSAntTasks.classpath" value="C:\Program Files\NetBeans 8.1\java\ant\extra\org-netbeans-modules-javawebstart-anttasks.jar" />
<property name="libs.spring-framework300.src" value="" />
<property name="empty.dir" value="C:\Users\wisne\Documents\NetBeansProjects\javafxsample\build\empty" />
<property name="javafx.deploy.backgroundupdate" value="false" />
<property name="javafx.disable.concurrent.runs" value="false" />
<property name="version-output" value="java version &quot;1.8" />
<property name="test.binarytestincludes" value="" />
<property name="libs.hibernate4-persistencemodelgen.src" value="" />
<property name="javafx.preloader.jar.path" value="" />
<property name="javadoc.preview" value="true" />
<property name="libs.jpa20-persistence.javadoc" value="C:\Program Files\NetBeans 8.1\java\modules\ext\docs\javax.persistence-2.1.0-doc.zip" />
<property name="java.home" value="C:\Program Files\Java\jdk1.8.0_181\jre" />
<property name="debug.test.classpath" value="C:\Program Files\Java\jdk1.8.0_181\jre/lib/javaws.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/deploy.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/plugin.jar:build/classes:C:\Program Files\NetBeans 8.1\platform\modules\ext\junit-4.12.jar:C:\Program Files\NetBeans 8.1\platform\modules\ext\hamcrest-core-1.3.jar:build/test/classes" />
<property name="netbeans.importclass" value="org.netbeans.upgrade.AutoUpgrade" />
<property name="ant.project.default-target" value="default" />
<property name="annotation.processing.run.all.processors" value="true" />
<property name="jar.archive.disabled" value="true" />
<property name="libs.PostgreSQLDriver.javadoc" value="" />
<property name="javafx.main.class" value="javafxsample.Javafxsample" />
<property name="libs.MySQLDriver.maven-pom" value="" />
<property name="libs.hibernate4-persistence.javadoc" value="C:\Program Files\NetBeans 8.1\java\modules\ext\docs\javax.persistence-2.1.0-doc.zip" />
<property name="javafx.application.implementation.version" value="1.0" />
<property name="http.nonProxyHosts" value="localhost|127.0.0.1|DESKTOP-JSCKJ80" />
<property name="libs.junit_4.javadoc" value="C:\Program Files\NetBeans 8.1\platform\docs\junit-4.12-javadoc.jar" />
<property name="run.classpath" value="dist/hangmanfx.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/javaws.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/deploy.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/plugin.jar:build/classes" />
<property name="endorsed.javafx.ant.classpath" value="." />
<property name="jna.boot.library.name" value="jnidispatch-410" />
<property name="sun.awt.datatransfer.timeout" value="1000" />
<property name="libs.jpa2-persistence.maven-pom" value="" />
<property name="annotation.processing.enabled.in.editor" value="false" />
<property name="libs.hibernate4-support.classpath" value="C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\antlr-2.7.7.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\c3p0-0.9.2.1.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\hibernate-c3p0-4.3.1.Final.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\mchange-commons-java-0.2.3.4.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\dom4j-1.6.1.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\ehcache-core-2.4.3.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\hibernate-ehcache-4.3.1.Final.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\hibernate-core-4.3.1.Final.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\jboss-logging-3.1.3.GA.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\hibernate-commons-annotations-4.0.4.Final.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\hibernate-entitymanager-4.3.1.Final.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\javassist-3.18.1-GA.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\jboss-transaction-api_1.2_spec-1.0.0.Final.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\slf4j-api-1.6.1.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\slf4j-simple-1.6.1.jar" />
<property name="nb.native.filechooser" value="false" />
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers" />
<property name="javac.deprecation" value="false" />
<property name="javadoc.use" value="true" />
<property name="sun.java2d.noddraw" value="true" />
<property name="javac.processorpath" value="C:\Program Files\Java\jdk1.8.0_181\jre/lib/javaws.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/deploy.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/plugin.jar" />
<property name="libs.hamcrest.maven-pom" value="" />
<property name="javac.compilerargs" value="" />
<property name="ant.file" value="C:\Users\wisne\Documents\NetBeansProjects\javafxsample\build.xml" />
<property name="libs.beans-binding.maven-pom" value="" />
<property name="libs.hibernate4-support.javadoc" value="C:\Program Files\NetBeans 8.1\java\modules\ext\docs\javax.persistence-2.1.0-doc.zip" />
<property name="libs.beans-binding.src" value="" />
<property name="java.vm.specification.vendor" value="Oracle Corporation" />
<property name="libs.swing-layout.src" value="C:\Program Files\NetBeans 8.1\platform\docs\swing-layout-1.0.4-src.zip" />
<property name="org.openide.major.version" value="IDE/1" />
<property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM" />
<property name="javafx.preloader.jar.filename" value="" />
<property name="netbeans.user" value="C:\Users\wisne\AppData\Roaming\NetBeans\8.1" />
<property name="javadoc.additionalparam" value="" />
<property name="java.io.tmpdir" value="C:\Users\wisne\AppData\Local\Temp\" />
<property name="javafx.run.inbrowser.path" value="C:\Program Files\Internet Explorer\iexplore.exe" />
<property name="java.vendor.url" value="http://java.oracle.com/" />
<property name="endorsed.classpath.cmd.line.arg" value="" />
<property name="junit.available" value="true" />
<property name="org.openide.awt.ActionReference.completion" value="org.netbeans.modules.apisupport.project.layers.PathCompletions" />
<property name="sun.boot.library.path" value="C:\Program Files\Java\jdk1.8.0_181\jre\bin" />
<property name="have.sources" value="true" />
<property name="libs.hamcrest.javadoc" value="" />
<property name="pythonplatform.Python_3.7.0.sourcelevel" value="3.7" />
<property name="debug.classpath" value="dist/hangmanfx.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/javaws.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/deploy.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/plugin.jar:build/classes" />
<property name="javadoc.private" value="false" />
<property name="test.src.dir" value="test" />
<property name="ap.processors.internal" value="" />
<property name="meta.inf.dir" value="src/META-INF" />
<property name="javadoc.encoding.used" value="UTF-8" />
<property name="ant.file.hangmanfx-impl" value="C:\Users\wisne\Documents\NetBeansProjects\javafxsample\nbproject\build-impl.xml" />
<property name="dist.jar" value="dist/hangmanfx.jar" />
<property name="libs.spring-framework400.maven-pom" value="" />
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment" />
<property name="ant.project.name" value="javafxsample" />
<property name="netbeans.hash.code" value="unique=NB_EXTIDE_JAVA0d7a62603-b5e0-4466-9bd4-b5813666fea1_8a8e1a1b-ad1a-4428-b614-ade29870a442" />
<property name="netbeans.default_userdir_root" value="C:\Users\wisne\AppData\Roaming\NetBeans" />
<property name="sun.cpu.isalist" value="amd64" />
<property name="libs.spring-framework400.javadoc" value="" />
<property name="libs.CopyLibs.javadoc" value="" />
<property name="org.openide.specification.version" value="6.2" />
<property name="javafx.classpath.extension" value="C:\Program Files\Java\jdk1.8.0_181\jre/lib/javaws.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/deploy.jar:C:\Program Files\Java\jdk1.8.0_181\jre/lib/plugin.jar" />
<property name="user.home" value="C:\Users\wisne" />
<property name="annotation.processing.processors.list" value="" />
<property name="debug-args-line" value="-Xdebug" />
<property name="libs.JWSAntTasks.src" value="" />
<property name="jar.index" value="false" />
<property name="libs.CopyLibs.maven-pom" value="" />
<property name="libs.spring-framework300.javadoc" value="" />
<property name="libs.absolutelayout.javadoc" value="" />
<property name="java.specification.name" value="Java Platform API Specification" />
<property name="java.specification.vendor" value="Oracle Corporation" />
<property name="libs.javac-api.classpath" value="C:\Program Files\NetBeans 8.1\java\modules\ext\nb-javac-api.jar" />
<property name="java.version" value="1.8.0_181" />
<property name="run.jvmargs.ide" value="" />
<property name="javadoc.version" value="false" />
<property name="libs.MySQLDriver.javadoc" value="" />
<property name="org.openide.version" value="deprecated" />
<property name="platform.java" value="C:\Program Files\Java\jdk1.8.0_181\jre/bin/java" />
<property name="source.encoding" value="UTF-8" />
<property name="ap.cmd.line.internal" value="" />
<property name="libs.eclipselinkmodelgen.maven-pom" value="" />
<property name="pythonplatform.Python_3.7.0.args" value="-u" />
<property name="ant.file.type.jfx-impl" value="file" />
<property name="libs.eclipselinkmodelgen.javadoc" value="" />
<property name="pythonplatform.Python_3.7.0.interpreter" value="C:\Users\wisne\AppData\Local\Programs\Python\Python37-32\python.exe" />
<property name="ant.file.jfx-impl" value="C:\Users\wisne\Documents\NetBeansProjects\javafxsample\nbproject\jfx-impl.xml" />
<property name="netbeans.home+have.tests" value="true" />
<property name="annotation.processing.processor.options" value="" />
<property name="libs.testng.maven-pom" value="" />
<property name="libs.jaxb.src" value="" />
<property name="ant.file.javafxsample" value="C:\Users\wisne\Documents\NetBeansProjects\javafxsample\build.xml" />
<property name="work.dir" value="C:\Users\wisne\Documents\NetBeansProjects\javafxsample" />
<property name="compile.on.save.unsupported.javafx" value="true" />
<property name="libs.jaxb.classpath" value="C:\Program Files\NetBeans 8.1\ide\modules\ext\jaxb\jaxb-impl.jar;C:\Program Files\NetBeans 8.1\ide\modules\ext\jaxb\jaxb-xjc.jar;C:\Program Files\NetBeans 8.1\ide\modules\ext\jaxb\jaxb1-impl.jar;C:\Program Files\NetBeans 8.1\ide\modules\ext\jaxb\activation.jar;C:\Program Files\NetBeans 8.1\ide\modules\ext\jaxb\api\jaxb-api.jar;C:\Program Files\NetBeans 8.1\ide\modules\ext\jaxb\api\jsr173_1.0_api.jar" />
<property name="do.depend" value="false" />
<property name="dist.javadoc.dir" value="dist/javadoc" />
<property name="libs.swing-layout.classpath" value="C:\Program Files\NetBeans 8.1\platform\modules\ext\swing-layout-1.0.4.jar" />
<property name="build.generated.dir" value="build/generated" />
<property name="javac.source" value="1.8" />
<property name="javafx.fallback.class" value="com.javafx.main.NoJavaFXFallback" />
<property name="line.separator" value="&#xd;&#xa;" />
<property name="java.specification.version" value="1.8" />
<property name="libs.jaxws21.maven-pom" value="" />
<property name="java.vm.info" value="mixed mode" />
<property name="pythonplatform.Python_3.7.0.pythonlib" value="C:\Users\wisne\AppData\Roaming\NetBeans\8.1;C:\Users\wisne\AppData\Local\Programs\Python\Python37-32\python37.zip;C:\Users\wisne\AppData\Local\Programs\Python\Python37-32\DLLs;C:\Users\wisne\AppData\Local\Programs\Python\Python37-32\lib;C:\Users\wisne\AppData\Local\Programs\Python\Python37-32;C:\Users\wisne\AppData\Local\Programs\Python\Python37-32\lib\site-packages" />
<property name="nb.junit.batch" value="true" />
<property name="junit.forkmode" value="perTest" />
<property name="sun.boot.class.path" value="C:\Program Files\Java\jdk1.8.0_181\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_181\jre\classes" />
<property name="javac.target" value="1.8" />
<property name="built-jar.properties" value="C:\Users\wisne\Documents\NetBeansProjects\javafxsample\build\built-jar.properties" />
<property name="build.test.classes.dir" value="build/test/classes" />
<property name="src.dir" value="src" />
<property name="annotation.processing.enabled" value="true" />
<property name="libs.jpa2-persistence.src" value="" />
<property name="sun.awt.keepWorkingSetOnMinimize" value="true" />
<property name="libs.jpa20-persistence.src" value="" />
<property name="javafx.enable.concurrent.external.runs" value="false" />
<property name="javafx.deploy.embedJNLP" value="true" />
<property name="dist.dir" value="dist" />
<property name="testng.debug.mode" value="" />
<property name="javac.fork" value="false" />
<property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob" />
<property name="default.javac.source" value="1.8" />
<property name="debug-transport-by-os" value="dt_shmem" />
<property name="libs.MySQLDriver.src" value="" />
<property name="sun.jnu.encoding" value="Cp1252" />
<property name="java.runtime.version" value="1.8.0_181-b13" />
<property name="build.test.results.dir" value="build/test/results" />
<property name="javafx.run.inbrowser" value="&lt;Default System Browser&gt;" />
<property name="pythonplatform.Python_3.7.0.name" value="Python 3.7.0" />
<property name="default.javac.target" value="1.8" />
<property name="libs.junit_4.classpath" value="C:\Program Files\NetBeans 8.1\platform\modules\ext\junit-4.12.jar" />
<property name="user.timezone" value="" />
<property name="nb.junit.single" value="false" />
<property name="netbeans.dirs" value="C:\Program Files\NetBeans 8.1\nb;C:\Program Files\NetBeans 8.1\ergonomics;C:\Program Files\NetBeans 8.1\ide;C:\Program Files\NetBeans 8.1\extide;C:\Program Files\NetBeans 8.1\java;C:\Program Files\NetBeans 8.1\apisupport;C:\Program Files\NetBeans 8.1\webcommon;C:\Program Files\NetBeans 8.1\websvccommon;C:\Program Files\NetBeans 8.1\enterprise;C:\Program Files\NetBeans 8.1\mobility;C:\Program Files\NetBeans 8.1\profiler;C:\Program Files\NetBeans 8.1\python;C:\Program Files\NetBeans 8.1\php;C:\Program Files\NetBeans 8.1\identity;C:\Program Files\NetBeans 8.1\harness;C:\Program Files\NetBeans 8.1\cnd;C:\Program Files\NetBeans 8.1\cndext;C:\Program Files\NetBeans 8.1\dlight;C:\Program Files\NetBeans 8.1\groovy;C:\Program Files\NetBeans 8.1\extra;C:\Program Files\NetBeans 8.1\javacard;C:\Program Files\NetBeans 8.1\javafx" />
<property name="java.ext.dirs" value="C:\Program Files\Java\jdk1.8.0_181\jre\lib\ext;C:\windows\Sun\Java\lib\ext" />
<property name="endorsed.classpath" value="" />
<property name="libs.absolutelayout.classpath" value="C:\Program Files\NetBeans 8.1\java\modules\ext\AbsoluteLayout.jar" />
<property name="excludes" value="" />
<property name="libs.jpa2-persistence.javadoc" value="C:\Program Files\NetBeans 8.1\java\modules\ext\docs\javax.persistence-2.1.0-doc.zip" />
<property name="apple.laf.useScreenMenuBar" value="true" />
<property name="java.class.path" value="C:\Program Files\Java\jdk1.8.0_181\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\plugin.jar;C:\Users\wisne\Documents\NetBeansProjects\javafxsample\build\classes;C:\Program Files\NetBeans 8.1\platform\modules\ext\junit-4.12.jar;C:\Program Files\NetBeans 8.1\platform\modules\ext\hamcrest-core-1.3.jar;C:\Users\wisne\Documents\NetBeansProjects\javafxsample\build\test\classes;C:\Program Files\NetBeans 8.1\extide\ant\lib\ant-launcher.jar;C:\Program Files\NetBeans 8.1\extide\ant\lib\ant.jar;C:\Program Files\NetBeans 8.1\extide\ant\lib\ant-junit.jar;C:\Program Files\NetBeans 8.1\extide\ant\lib\ant-junit4.jar" />
<property name="libs.absolutelayout.src" value="" />
<property name="libs.jpa20-persistence.classpath" value="C:\Program Files\NetBeans 8.1\java\modules\ext\eclipselink\javax.persistence_2.1.0.v201304241213.jar" />
<property name="os.version" value="10.0" />
<property name="application.args" value="" />
<property name="manifest.custom.permissions" value="" />
<property name="main.class.available" value="true" />
<property name="sun.awt.enableExtraMouseButtons" value="true" />
<property name="sun.desktop" value="windows" />
<property name="libs.hibernate4-persistence.src" value="" />
<property name="libs.hibernate4-support.maven-pom" value="" />
<property name="javafx.deploy.allowoffline" value="true" />
<property name="libs.JAXB-ENDORSED.classpath" value="C:\Program Files\NetBeans 8.1\ide\modules\ext\jaxb\api\jaxb-api.jar" />
<property name="nb.internal.action.name" value="run.single" />
<property name="libs.eclipselink.classpath" value="C:\Program Files\NetBeans 8.1\java\modules\ext\eclipselink\eclipselink.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\eclipselink\javax.persistence_2.1.0.v201304241213.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\eclipselink\org.eclipse.persistence.jpa.jpql_2.5.2.v20140319-9ad6abd.jar" />
<property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment" />
<property name="libs.beans-binding.javadoc" value="C:\Program Files\NetBeans 8.1\java\docs\beansbinding-1.2.1-doc.zip" />
<property name="java.vm.vendor" value="Oracle Corporation" />
<property name="libs.CopyLibs.classpath" value="C:\Program Files\NetBeans 8.1\java\ant\extra\org-netbeans-modules-java-j2seproject-copylibstask.jar" />
<property name="libs.spring-framework300.classpath" value="C:\Program Files\NetBeans 8.1\ide\modules\org-apache-commons-logging.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\cglib-2.2.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-aop-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-aspects-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-beans-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-build-src-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-context-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-context-support-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-core-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-expression-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-framework-bom-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-instrument-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-instrument-tomcat-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-jdbc-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-jms-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-orm-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-oxm-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-struts-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-test-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-tx-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-web-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-webmvc-3.2.7.RELEASE.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\spring-3.0\spring-webmvc-portlet-3.2.7.RELEASE.jar" />
<property name="libs.hamcrest.src" value="" />
<property name="run.jvmargs" value="" />
<property name="libs.hibernate4-persistence.classpath" value="C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\antlr-2.7.7.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\c3p0-0.9.2.1.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\hibernate-c3p0-4.3.1.Final.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\mchange-commons-java-0.2.3.4.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\dom4j-1.6.1.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\ehcache-core-2.4.3.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\hibernate-ehcache-4.3.1.Final.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\hibernate-core-4.3.1.Final.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\jboss-logging-3.1.3.GA.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\hibernate-commons-annotations-4.0.4.Final.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\hibernate-entitymanager-4.3.1.Final.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\javassist-3.18.1-GA.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\jboss-transaction-api_1.2_spec-1.0.0.Final.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\slf4j-api-1.6.1.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\slf4j-simple-1.6.1.jar;C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\hibernate-jpa-2.1-api-1.0.0.Final.jar" />
<property name="libs.JAXB-ENDORSED.src" value="" />
<property name="libs.testng.javadoc" value="C:\Program Files\NetBeans 8.1\platform\docs\testng-6.8.1-javadoc.zip" />
<property name="user.script" value="" />
<property name="libs.PostgreSQLDriver.classpath" value="C:\Program Files\NetBeans 8.1\ide\modules\ext\postgresql-9.2-1002.jdbc4.jar" />
<property name="libs.hibernate4-persistencemodelgen.classpath" value="C:\Program Files\NetBeans 8.1\java\modules\ext\hibernate4\hibernate-jpamodelgen-4.3.1.Final.jar" />
<property name="annotation.processing.source.output" value="build/generated-sources/ap-source-output" />
<property name="main.class" value="com.javafx.main.Main" />
<property name="libs.CopyLibs.src" value="" />
<property name="build.dir" value="build" />
<property name="ant.file.type.javafxsample" value="file" />
<property name="ant.version" value="Apache Ant(TM) version 1.9.4 compiled on April 29 2014" />
<property name="file.encoding" value="Cp1252" />
<property name="build.classes.excludes" value="**/*.java,**/*.form" />
<property name="jdkBug6558476" value="false" />
<property name="javadoc.nonavbar" value="false" />
<property name="platform.active" value="default_platform" />
<property name="awt.toolkit" value="sun.awt.windows.WToolkit" />
</properties>
<testcase classname="hangman.GameTest" name="testProcessGuess" time="0.0">
<error type="java.lang.NullPointerException">java.lang.NullPointerException
at hangman.GameTest.testProcessGuess(GameTest.java:91)
</error>
</testcase>
<testcase classname="hangman.GameTest" name="testGetWord" time="0.0">
<error type="java.lang.NullPointerException">java.lang.NullPointerException
at hangman.GameTest.testGetWord(GameTest.java:48)
</error>
</testcase>
<testcase classname="hangman.GameTest" name="testGetRemainingGuesses" time="0.0">
<error type="java.lang.NullPointerException">java.lang.NullPointerException
at hangman.GameTest.testGetRemainingGuesses(GameTest.java:62)
</error>
</testcase>
<testcase classname="hangman.GameTest" name="testDoHint" time="0.0">
<error type="java.lang.NullPointerException">java.lang.NullPointerException
at hangman.GameTest.testDoHint(GameTest.java:105)
</error>
</testcase>
<testcase classname="hangman.GameTest" name="testGetDisplay" time="0.0">
<error type="java.lang.NullPointerException">java.lang.NullPointerException
at hangman.GameTest.testGetDisplay(GameTest.java:76)
</error>
</testcase>
<system-out><![CDATA[processGuess
getWord
getRemainingGuesses
doHint
getDisplay
]]></system-out>
<system-err><![CDATA[]]></system-err>
</testsuite>

BIN
338/lab5/source/h1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

BIN
338/lab5/source/h2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
338/lab5/source/h3.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
338/lab5/source/h4.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
338/lab5/source/h5.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
338/lab5/source/h6.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
338/lab5/source/h7.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,3 @@
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,2 @@
# Do not modify this property in this configuration. It can be re-generated.
$label=Run as WebStart

View File

@ -0,0 +1,2 @@
# Do not modify this property in this configuration. It can be re-generated.
$label=Run in Browser

View File

@ -0,0 +1,8 @@
build.xml.data.CRC32=6ba13265
build.xml.script.CRC32=9ac9c85d
build.xml.stylesheet.CRC32=8064a381@1.79.1.48
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=21992267
nbproject/build-impl.xml.script.CRC32=67abe0ae
nbproject/build-impl.xml.stylesheet.CRC32=05530350@1.79.1.48

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,2 @@
# Do not modify this property in this configuration. It can be re-generated.
javafx.run.as=webstart

View File

@ -0,0 +1,2 @@
# Do not modify this property in this configuration. It can be re-generated.
javafx.run.as=embedded

View File

@ -0,0 +1,6 @@
auxiliary.org-netbeans-modules-projectapi.issue214819_5f_fx_5f_enabled=true
# No need to modify this property unless customizing JavaFX Ant task infrastructure
endorsed.javafx.ant.classpath=.
javafx.run.inbrowser=<Default System Browser>
javafx.run.inbrowser.path=C:\\Program Files\\Internet Explorer\\iexplore.exe
user.properties.file=C:\\Users\\wisne\\AppData\\Roaming\\NetBeans\\8.1\\build.properties

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group/>
</open-files>
</project-private>

View File

@ -0,0 +1,115 @@
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processor.options=
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=hangmanfx
application.vendor=wisne
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
compile.on.save=true
compile.on.save.unsupported.javafx=true
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/hangmanfx.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
includes=**
# Non-JavaFX jar file creation is deactivated in JavaFX 2.0+ projects
jar.archive.disabled=true
jar.compress=false
javac.classpath=\
${javafx.classpath.extension}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
javac.source=1.8
javac.target=1.8
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
${libs.junit_4.classpath}:\
${libs.hamcrest.classpath}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
javafx.application.implementation.version=1.0
javafx.binarycss=false
javafx.classpath.extension=\
${java.home}/lib/javaws.jar:\
${java.home}/lib/deploy.jar:\
${java.home}/lib/plugin.jar
javafx.deploy.allowoffline=true
# If true, application update mode is set to 'background', if false, update mode is set to 'eager'
javafx.deploy.backgroundupdate=false
javafx.deploy.embedJNLP=true
javafx.deploy.includeDT=true
# Set true to prevent creation of temporary copy of deployment artifacts before each run (disables concurrent runs)
javafx.disable.concurrent.runs=false
# Set true to enable multiple concurrent runs of the same WebStart or Run-in-Browser project
javafx.enable.concurrent.external.runs=false
# This is a JavaFX project
javafx.enabled=true
javafx.fallback.class=com.javafx.main.NoJavaFXFallback
# Main class for JavaFX
javafx.main.class=javafxsample.Javafxsample
javafx.preloader.class=
# This project does not use Preloader
javafx.preloader.enabled=false
javafx.preloader.jar.filename=
javafx.preloader.jar.path=
javafx.preloader.project.path=
javafx.preloader.type=none
# Set true for GlassFish only. Rebases manifest classpaths of JARs in lib dir. Not usable with signed JARs.
javafx.rebase.libs=false
javafx.run.height=600
javafx.run.width=800
# Pre-JavaFX 2.0 WebStart is deactivated in JavaFX 2.0+ projects
jnlp.enabled=false
# Main class for Java launcher
main.class=com.javafx.main.Main
# For improved security specify narrower Codebase manifest attribute to prevent RIAs from being repurposed
manifest.custom.codebase=*
# Specify Permissions manifest attribute to override default (choices: sandbox, all-permissions)
manifest.custom.permissions=
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
platform.active=default_platform
run.classpath=\
${dist.jar}:\
${javac.classpath}:\
${build.classes.dir}
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<buildExtensions xmlns="http://www.netbeans.org/ns/ant-build-extender/1">
<extension file="jfx-impl.xml" id="jfx3">
<dependency dependsOn="-jfx-copylibs" target="-post-jar"/>
<dependency dependsOn="-rebase-libs" target="-post-jar"/>
<dependency dependsOn="jfx-deployment" target="-post-jar"/>
<dependency dependsOn="jar" target="debug"/>
<dependency dependsOn="jar" target="profile"/>
<dependency dependsOn="jar" target="run"/>
</extension>
</buildExtensions>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>hangmanfx</name>
<source-roots>
<root id="src.dir"/>
</source-roots>
<test-roots>
<root id="test.src.dir"/>
</test-roots>
</data>
</configuration>
</project>

View File

@ -0,0 +1,112 @@
package hangman;
/**
* Game contains the logic for game of hangman.
*
*/
public class Game {
protected String word;
protected int remaining_guesses;
protected StringBuffer display;
protected String correctGuess;
protected String badGuess;
/**
* Game constructor
* @param word - the word to be guessed
* @param guesses - number of incorrect guesses allowed
*/
public Game(String word, int guesses) {
this.word = word;
remaining_guesses = guesses;
correctGuess = "";
badGuess = "";
display = new StringBuffer();
for (int i = 0; i < word.length(); i++) {
char c = word.charAt(i);
if (Character.isLetter(c)) {
display.append("_");
} else {
display.append("#");
}
display.append(" ");
}
}
public String getWord() {
return word;
}
public int getRemainingGuesses() {
return remaining_guesses;
}
public String getDisplay() {
return display.toString();
}
/* return code from processGuess */
public static final int GOOD = 1;
public static final int BAD = 2;
public static final int WON = 3;
public static final int LOST = 4;
public static final int REPEAT_GOOD_GUESS = 5;
public static final int REPEAT_BAD_GUESS = 6;
/**
*
* @param c - the letter guessed
* @return code
*/
public int processGuess(char c) {
if (correctGuess.indexOf(c) >= 0) {
return REPEAT_GOOD_GUESS;
}
if (badGuess.indexOf(c) >= 0) {
remaining_guesses -= 1;
if (remaining_guesses <= 0 && display.indexOf("_") >= 0) {
return LOST;
} else {
return REPEAT_BAD_GUESS;
}
} else {
boolean found = false;
for (int i = 0; i < word.length(); i++) {
if (c == word.charAt(i)) {
found = true;
correctGuess += c;
display.replace(2 * i, 2 * i + 1, word.substring(i, i + 1));
}
}
if (!found) {
remaining_guesses -= 1;
badGuess += c;
if (remaining_guesses <= 0 && display.indexOf("_") >= 0) {
return LOST;
} else {
return BAD;
}
}
}
if (display.indexOf("_") < 0) {
return WON;
} else {
return GOOD;
}
}
/**
* user asks for a hint.
* @return code WON, LOST or GOOD.
*/
public int doHint() {
int k = display.indexOf("_");
char c = word.charAt(k / 2);
int rc = processGuess(c);
return rc;
}
}

View File

@ -0,0 +1,156 @@
package hangman;
import java.io.*;
import java.util.ArrayList;
import java.util.Random;
import java.util.Scanner;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.TextField;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class Hangman extends Application {
Image[] images = new Image[7];
ArrayList<String> words;
Game g;
ImageView imageView;
Text text1;
Text text2;
TextField textField;
@Override
public void start(Stage stage) throws Exception {
words = new ArrayList<String>();
readFile();
g = new Game(pickRandomWord(), 6);
try {
//load image files
images[0] = new Image(new FileInputStream("./h1.gif"));
images[1] = new Image(new FileInputStream("./h2.gif"));
images[2] = new Image(new FileInputStream("./h3.gif"));
images[3] = new Image(new FileInputStream("./h4.gif"));
images[4] = new Image(new FileInputStream("./h5.gif"));
images[5] = new Image(new FileInputStream("./h6.gif"));
images[6] = new Image(new FileInputStream("./h7.gif"));
} catch (Exception e) {
System.out.println("Error. " + e.getMessage());
System.exit(0);
}
imageView = new ImageView(images[0]);
text1 = new Text("Guess a letter or ask for hint.");
text2 = new Text(g.getDisplay());
textField = new TextField();
textField.setOnAction(new GameController());
VBox vbox = new VBox(10);
vbox.getChildren().addAll(imageView, text1, text2, textField);
//Creating a scene object
Scene scene = new Scene(vbox, 250, 350);
stage.setTitle("Play Hangman");
stage.setScene(scene);
stage.show();
}
public class GameController implements EventHandler<ActionEvent> {
@Override
public void handle(ActionEvent ae) {
String user_input = textField.getText();
//DEBUG System.out.println(user_input);
if (user_input.length() == 0) {
text1.setText("Enter a single letter or enter hint.");
text2.setText(g.getDisplay());
textField.setText("");
} else if (user_input.equalsIgnoreCase("hint")) {
int rc = g.doHint();
imageView.setImage(images[6 - g.getRemainingGuesses()]);
if (rc == Game.WON) {
text1.setText("You won!");
text2.setText(g.getDisplay());
textField.setText("");
} else if (rc == Game.LOST) {
text1.setText("");
text2.setText("Game over. The word was: " + g.getWord());
textField.setText("");
} else {
text1.setText("Enter a guess or hint.");
text2.setText(g.getDisplay());
textField.setText("");
}
} else {
char c = user_input.charAt(0);
int rc = g.processGuess(c);
switch (rc) {
case Game.BAD:
text1.setText("No " + c + " in the word. " + g.getRemainingGuesses() + " attempts left.");
textField.setText("");
imageView.setImage(images[6 - g.getRemainingGuesses()]);
break;
case Game.GOOD:
text1.setText("Yes. There is a " + c + " in the word.");
text2.setText(g.getDisplay());
textField.setText("");
break;
case Game.LOST:
text1.setText("That was your last guess. Game Over");
text2.setText("Word was: " + g.getWord());
imageView.setImage(images[6]);
textField.setText("");
break;
case Game.WON:
text1.setText("You won!");
text2.setText(g.getDisplay());
textField.setText("");
break;
case Game.REPEAT_GOOD_GUESS:
text1.setText("You already guessed that letter.");
text2.setText(g.getDisplay());
textField.setText("");
case Game.REPEAT_BAD_GUESS:
text1.setText("You already guessed that letter.");
text2.setText(g.getDisplay());
textField.setText("");
imageView.setImage(images[6 - g.getRemainingGuesses()]);
}
}
}
}
public static void main(String[] args) {
launch(args);
}
public void readFile(){
try {
File f = new File("words.txt");
Scanner infile = new Scanner(f);
while (infile.hasNext()){
words.add(infile.nextLine().trim());
}
infile.close();
}catch (Exception e){
System.out.println("Error exception. "+e.getMessage());
System.exit(0);
}
}
public String pickRandomWord() {
int k = new Random().nextInt(words.size());
return words.get(k);
}
}

View File

@ -0,0 +1,102 @@
package hangman;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
public class GameTest {
public GameTest() {
}
@BeforeClass
public static void setUpClass() {
}
@AfterClass
public static void tearDownClass() {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
/**
* Test of getWord method, of class Game.
*/
@Test
public void testGetWord() {
System.out.println("getWord");
Game instance = null;
String expResult = "";
String result = instance.getWord();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
/**
* Test of getRemainingGuesses method, of class Game.
*/
@Test
public void testGetRemainingGuesses() {
System.out.println("getRemainingGuesses");
Game instance = null;
int expResult = 0;
int result = instance.getRemainingGuesses();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
/**
* Test of getDisplay method, of class Game.
*/
@Test
public void testGetDisplay() {
System.out.println("getDisplay");
Game instance = null;
String expResult = "";
String result = instance.getDisplay();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
/**
* Test of processGuess method, of class Game.
*/
@Test
public void testProcessGuess() {
System.out.println("processGuess");
char c = ' ';
Game instance = null;
int expResult = 0;
int result = instance.processGuess(c);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
/**
* Test of doHint method, of class Game.
*/
@Test
public void testDoHint() {
System.out.println("doHint");
Game instance = null;
int expResult = 0;
int result = instance.doHint();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
}

View File

@ -0,0 +1,7 @@
computer
science
mathematics
religion
history
philosophy
language

127
338/roman/Roman.java Normal file
View File

@ -0,0 +1,127 @@
import java.util.Scanner;
/**
* Roman numerals
* I 1
* V 5
* X 10
* L 50
* C 100
* D 500
* M 1000
*
* Numbers are written in decreasing value
* Example: XII is 12, not IIX or IXI
*
* But there are special rules:
* I can come before V or X IV = 4, IX = 9
* X can come before L or C XL = 40, XC = 90
* C can come before D or M CD = 400 CM = 900
*/
public class Roman {
public static String intToRoman(int n) {
String ret = "";
int val = n;
// dealing with the thousands case
if(n > 1000) {
int m = val / 1000;
for(int i =0;i<m;i++) {
ret += "M";
val -= 1000;
}
}
// 900 case
if(val>=900) {
ret += "CM";
val -= 900;
}
// 600-800 range
if(val>=600) {
int c = (val - 500)/100;
for(int i =0;i<c;i++) {
ret += "C";
}
val -= 500;
}
// special case 500
if(val>=500) {
ret += "D";
val -= 500;
}
// 400 special case
if(val>=400) {
ret +="CD";
val -= 400;
}
// 100 - 300 range
if(val>=100) {
int x = (val - 100)/100;
for(int i =0;i<x;i++) {
ret += "X";
}
val -= 100;
}
// sub 100 range now
// 90 special case first
if(val>=90) {
val -=90;
ret += "XC";
}
if(val>=50) {
ret += "L";
int L=(val-50)/10;
for(int i =0;i<L;i++) {
ret += "X";
}
val -= 50;
}
if(val>=40) {
ret += "XL";
val -= 40;
}
if(val>=10) {
int x = (val - 10)/10;
for(int i =0;i<x;i++) {
ret += "X";
}
val -= 10;
}
if(val==9) {
ret += "IX";
return ret;
}
if(val>5){
int c = (val - 5);
for(int i =0;i<c;i++) {
ret += "I";
}
val -=5;
}
if(val==5) {
ret += "V";
return ret;
}
if(val==4) {
ret += "IV";
return ret;
}
return ret;
}
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (true) {
System.out.print("Enter Roman Number or q for quit. ");
String x = in.nextLine();
if (x.equals("q"))
return;
// now we deal with normal cases
int n = Integer.parseInt(x);
System.out.println(n + " : " + intToRoman(n));
}
}
}

21
338/roman/makefile Normal file
View File

@ -0,0 +1,21 @@
cc=~/Downloads/jdk-11.0.2/bin/javac
fxlib=--module-path /home/shockrah/Downloads/javafx-sdk-11.0.2/lib
ctrl=--add-modules javafx.controls
env=~/Downloads/jdk-11.0.2/bin/java
jfile="Roman.java"
cfile="Roman"
default:
# takes a java file as entry to build
#$(cc) $(fxlib) $< $(ctr)
$(cc) $(jfile)
# ouchie
run:
#$(env) $(fxlib) $(ctrl) $(cfile)
$(env) $(cfile)
clean:
rm -f *class

1
338/scripts/make.sh Normal file
View File

@ -0,0 +1 @@
javac --module-path /home/shockrah/Downloads/javafx-sdk-11.0.2/lib $1 --add-modules javafx.controls

14
338/scripts/makefile Normal file
View File

@ -0,0 +1,14 @@
cc=javac
fxlib=--module-path /home/shockrah/Downloads/javafx-sdk-11.0.2/lib
ctrl=--add-modules javafx.controls
env=java
cfile="adsf"
default: %.java
# takes a java file as entry to build
$(cc) $(fxlib) $< $(ctr)
# ouchie
run:
$(env) $(fxlib) $(ctrl) $(cfile)

2
338/scripts/run.sh Normal file
View File

@ -0,0 +1,2 @@
[ -z $1 ] && echo "no target" && exit 1
java --module-path /home/shockrah/Downloads/javafx-sdk-11.0.2/lib --add-modules javafx.controls $1

23
338/tmp/HelloFX.java Normal file
View File

@ -0,0 +1,23 @@
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class HelloFX extends Application {
@Override
public void start(Stage stage) {
String javaVersion = System.getProperty("java.version");
String javafxVersion = System.getProperty("javafx.version");
Label l = new Label("Hello, JavaFX " + javafxVersion + ", running on Java " + javaVersion + ".");
Scene scene = new Scene(new StackPane(l), 640, 480);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch();
}
}

1
338/tmp/make.sh Normal file
View File

@ -0,0 +1 @@
javac --module-path /home/shockrah/Downloads/javafx-sdk-11.0.2/lib $1 --add-modules javafx.controls

14
338/tmp/makefile Normal file
View File

@ -0,0 +1,14 @@
cc=~/Downloads/jdk-11.0.2/bin/javac
fxlib=--module-path /home/shockrah/Downloads/javafx-sdk-11.0.2/lib
ctrl=--add-modules javafx.controls
env=~/Downloads/jdk-11.0.2/bin/java
cfile="adsf"
default: %.java
# takes a java file as entry to build
$(cc) $(fxlib) $< $(ctr)
# ouchie
run:
$(env) $(fxlib) $(ctrl) $(cfile)

2
338/tmp/run.sh Normal file
View File

@ -0,0 +1,2 @@
[ -z $1 ] && echo "no target" && exit 1
java --module-path /home/shockrah/Downloads/javafx-sdk-11.0.2/lib --add-modules javafx.controls $1

23
338/tmp/temp.java Normal file
View File

@ -0,0 +1,23 @@
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
/* */
public class temp extends Application {
// start application things
@Override
public void start(Stage stage) {
// label for entry text box
Label input_label = new Label("Farenheit: ");
// set up the X window
Scene scene = new Scene(new StackPane(input_label), 640, 480);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch();
}
}

View File

@ -43,5 +43,3 @@ There is tons of collision however, which means we have to recover a ton as well
Pure unslotted ALOHA we basically transmit a frame as soon as is arrives which means frames can overlap. Pure unslotted ALOHA we basically transmit a frame as soon as is arrives which means frames can overlap.
Putting these frames into slots allows us to reduce this collision probability overall raising our efficiency. Putting these frames into slots allows us to reduce this collision probability overall raising our efficiency.

View File

@ -19,4 +19,4 @@ If nothing comes up we commit with no issue.
If something does come up we abort and restart the transaction with a new snapshot, _this time with the new stuff_. If something does come up we abort and restart the transaction with a new snapshot, _this time with the new stuff_.
This time around we should be ok to commit. This time around we should be ok to commit.
The overhead comes in hard if we have to be correcting transaction but, if we don't find ourselveds do that too much then it beats graphs and trees since there's barely anything to maintain. The overhead comes in hard if we have to be correcting transaction but, if we don't find ourselves doing that too much then it beats graphs and trees since there's barely anything to maintain.

View File

@ -2,7 +2,7 @@
## Functional Dependancy ## Functional Dependancy
If we have an attribute a that could produce `b,c,d` reliably everytime then we would only need to keep track of `a` instead of keeping track of all the repeats because the dependants depend on `a`. If we have an attribute `a` that could produce `b,c,d` reliably everytime then we would only need to keep track of `a` instead of keeping track of all the repeats because the dependants depend on `a`.
Example: Example:
``` ```

37
cst363/lec/lec26.md Normal file
View File

@ -0,0 +1,37 @@
# lec26
## Some types of Database Structures
1. Key-Values
Just like a standard map, we provide a `key` and get a `value`.
Maks things easy for usage but recall that our hash function is really delicate.
Because we're using a map or a set type of container.
2. Document
Welcome to json/xml world.
Now we just look for documents(json/xml) instead of looking for some data with a predefined structure.
3. Column Family
Variant of key/value but this time we store things in columns instead of rows.
Advantage here is that we can quickly search through columns for analysis type things.
4. Graph
Data is a _graph_(wow).
We still have some key-value system to find a node in the graph but we can create edges between values to create relationships.
## NoSQL
### In favor of usage
* Data is not uniform
* Dataset is massive
### Against
* You need consistency
*

View File

@ -0,0 +1,3 @@
# Introduction