ASSIGNMENT FINAL FINAL ASSIGNMENT – APPLICATION LO-COMP 8016 Page 1 | Version 9.1 SUBMISSION INSTRUCTIONS Send ONE *.zip compressed file containing all your .java (no .class files) Submit your...

1 answer below »
I need help running some code in Eclipse. would it be possible to get help from an expert. i'll provide the assignment PDF and my code. i can't get it running and its driving me nuts.



ASSIGNMENT FINAL FINAL ASSIGNMENT – APPLICATION LO-COMP 8016 Page 1 | Version 9.1 SUBMISSION INSTRUCTIONS Send ONE *.zip compressed file containing all your .java (no .class files) Submit your assignment through blackboard (submit assignment link). Name your assignment file (the zip file) Assignment_FINAL_. For example; Assignment_FINAL_Neilsen_Janeil.zip NOTE: All external files and images must be loaded from (C:\temp\). GRADING MATRIX The following provides you with feedback on each area you are graded on for the assignments in this course. Trait 90% –- 100% 70% –- 89% 50% - 69% 0% - 49% Specifications The program works and meets all of the specifications. The program works and produces the correct results and displays them correctly. It also meets most of the other specifications. The program produces correct results but does not display them correctly. The program is producing incorrect results. Readability The code is exceptionally well organized and very easy to follow. The code is fairly easy to read. The code is readable only by someone who knows what it is supposed to be doing. The code is poorly organized and very difficult to read. Reusability The code could be reused as a whole or each routine could be reused. Most of the code could be reused in other programs. Some parts of the code could be reused in other programs. The code is not organized for reusability. Documentation The documentation is well written and clearly explains what the code is accomplishing and how. The documentation consists of embedded comment and some simple header documentation that is somewhat useful in understanding the code. The documentation is simply comments embedded in the code with some simple header comments separating routines. The documentation is simply comments embedded in the code and does not help the reader understand the code. Delivery The program was delivered on time. The program was delivered within a week of the due date. The code was within 2 weeks of the due date. The code was more than 2 weeks overdue. Efficiency The code is extremely efficient without sacrificing readability and understanding. The code is fairly efficient without sacrificing readability and understanding. The code is brute force and unnecessarily long. The code is huge and appears to be patched together. FINAL ASSIGNMENT – APPLICATION LO-COMP 8016 Page 2 | Version 9.1 ASSIGNMENT BACKGROUND This assignment builds upon all that you have learned in this course. ASSIGNMENT PREPARATION In order to prepare for this assignment question you should attempt:  all debugging exercise in chapters 9 to 15  complete 5 exercises from each chapter 9 to 15 (odd questions) ASSIGNMENT QUESTIONS You can do Assignment Question A or Assignment Question B: ASSIGNMENT QUESTION A Create a JavaFX, FXML, FXML Controller class and CSS file that contains an Alien Hunt game. Place eight numbered buttons in the app. . Randomly assign Martians to six of the buttons and Jupiterians to two. Hint: You do not need to create an Alien array; you can simply create an array that randomly contains 0s and 1s, representing Martians and Jupiterians. Be sure to use your Alien classes that you have already created and change them to work in JavaFX The object of the game is to find all the Martians before finding both Jupiterians. When a user clicks a button, display the Alien represented by the button (the Alien drawing from your Alien class). If the user clicks two Jupiterians before clicking six Martians, the player loses the game. When this happens, display two Jupiterians and a message telling the user that Earth has been destroyed. Disable any button after it has been selected. Save the game as JAlienHunt.java. Now modify the game to add some “spark” to the game.  Use colours and sound. For example, when the player loses the game perhaps show the earth exploding or have the screen flash between red and black. Play a small sound file as the player is looking for the Martian.  Modify the game so that it stores the player's highest score from any previous game in a file (in c:\temp\) and displays the high score at the start of each new game. The first time you play the game, the high score is 0 and the file is created. 10 points for saving the world.  Have an Alien animate using the javaFX transitions. Unknown FINAL ASSIGNMENT – APPLICATION LO-COMP 8016 Page 3 | Version 9.1 ASSIGNMENT QUESTION B If you had taken my Intro to Java class online you can do this assignment in place of A. The Final Project in the last class, SheepHerder, was a simple console game but now I want you to upgrade it by doing the following:  Make it into a JavaFX application using FXML and CSS files.  Make it GUI...  Have images of the Wolf and sheep.  Have sounds  Have scores saved in a file (in C:\temp directory)  OPTIONAL: You could even have a save game file… (Do this to get perfect Marks)  Use: ArrayLists, Inheritance, Multidimensional arrays, Random Access Data Files and Exception handeling.  I also want to see the use of a new Interface (maybe holding the arrayLists?) and something must animate at some time in the game using the JavaFX Transition. Unknown Unknown Unknown
Answered 1 days AfterApr 10, 2021

Answer To: ASSIGNMENT FINAL FINAL ASSIGNMENT – APPLICATION LO-COMP 8016 Page 1 | Version 9.1 SUBMISSION...

Pulkit answered on Apr 11 2021
148 Votes
java/.idea/.gitignore
# Default ignored files
/shelf/
/workspace.xml
java/.idea/java.iml







java/.idea/misc.xml




java/.idea/modules.xml






java/.idea/workspace.xml










































1618130993967


16181309939
67



java/Alien.class
public abstract synchronized class Alien {
protected String name;
protected String typeOfAlien;
private String homePlanet;
private int numberOfEyes;
public void Alien(String, String, String, int);
abstract String getName();
abstract String getTypeOfAlien();
public String getHomePlanet();
public int getNumberOfEyes();
public String toString();
}
java/Alien.java
java/Alien.java
public abstract class Alien

        /**
         * private and protected class members for the application.  only the protected members are directly accessible
         * by the derived classes.  the private members need to be accessed by local or overridden public methods.
         */
        protected String name;
        protected String typeOfAlien;
        private String homePlanet;
        private int numberOfEyes;

        /**
         * overloaded constructor for the class.  any derived class of this class will have to call the super constructor
         * and pass it 4 parameters as defined the the constructor of this class
         * @param name holds the name String that the alien is given
         * @param typeOfAlien represents the type of Alien the object is (Martian or Jupiterian)
         * @param homePlanet represents the planet where the alien originates from
         * @param numberOfEyes value that holds the number of eyes the alien has
         */
        public Alien(String name, String typeOfAlien, String homePlanet, int numberOfEyes)
        {
                this.name = name;
                this.typeOfAlien = typeOfAlien;
                this.homePlanet = homePlanet;
                this.numberOfEyes = numberOfEyes;
        }

        /**
         * abstract getter method.  To use this method, it has to be implemented from within the derived classes
         * @return name which represent the name of the alien
         */
        abstract String getName();

        /**
         * abstract getter method.  To use this method, it has to be implemented from within the derived classes
         * @return typeOfAlien which represents the type of alien (Martian or Jupiterian)
         */
        abstract String getTypeOfAlien();

        /**
         * public method that can be used in the super class or overridden in the derived classes.
         * @return homePlanet which is used to identify where the alien was born or comes from
         */
        public String getHomePlanet()
        {
                return homePlanet;
        }

        /**
         * public method that can be used in the super class or overridden in the derived classes.
         * @return numberOfEyes that represents the number of eyes the alien has
         */
        public int getNumberOfEyes()
        {
                return numberOfEyes;
        }

        /**
         * user defined toString() method that will return more than the default class.toString() method
         * @return classDetails.  This is a concatenated string of all the fields of the alien
         */
        public String toString()
        {
                String classDetails = getName() + ", a " + getTypeOfAlien() + " is from " + getHomePlanet() + " and has "
                                + getNumberOfEyes() + " eyes!";
 
                return classDetails;
        }
}
java/JAlienHunt.class
public synchronized class JAlienHunt extends javax.swing.JApplet implements java.awt.event.ActionListener {
private static final long serialVersionUID = 1;
private final java.util.Random randomGenNumber;
private java.nio.file.FileSystem fs;
private java.io.File scoresFile;
private int jupiteriansFound;
private int martiansFound;
private int selectedIndex;
private int loggedScore;
private int currentHighScore;
private boolean gameInProgress;
private javax.swing.JLabel appletTicker;
private javax.swing.JLabel highScoreTicker;
private javax.swing.JButton oneButton;
private javax.swing.JButton twoButton;
private javax.swing.JButton threeButton;
private javax.swing.JButton fourButton;
private javax.swing.JButton fiveButton;
private javax.swing.JButton sixButton;
private javax.swing.JButton sevenButton;
private javax.swing.JButton eightButton;
private javax.swing.JMenuBar mainBar;
private javax.swing.JMenu menu1;
private javax.swing.JMenu menu2;
private javax.swing.JMenu menu3;
private javax.swing.JMenuItem play;
private javax.swing.JMenuItem exit;
private javax.swing.JMenuItem rules;
private javax.swing.JMenuItem about;
private javax.swing.JCheckBoxMenuItem musicOff;
private Jupiterian newJupiterian;
private Martian newMartian;
private int[] alienArray;
private javax.swing.JButton[] buttonArray;
private java.awt.Container con;
java.awt.Color bgColor;
java.util.Date date;
java.applet.AudioClip gameMusic;
java.applet.AudioClip monkeyShout;
java.applet.AudioClip blowUpEarth;
java.applet.AudioClip drawingBoard;
public void JAlienHunt();
public void init();
public void actionPerformed(java.awt.event.ActionEvent);
public void scoreKeeper();
public void shuffleArray();
public void logScores(int);
public void...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here