Using your knowledge and skills you acquired in this class, create a Java project in any theme or topic you choose. Requirements: I highly recommend that you try to create a GUI project: Either Using...

1 answer below »

Using your knowledge and skills you acquired in this class, create a Java project in any theme or topic you choose.


Requirements:



  • I highly recommend that you try to create a GUI project: Either Using java Swings orGreenfoot

  • The projects should reflect the majority of the concepts that you have learned in this class such as logical statements, loops, arrays, using several libraries, methods and classes.

  • Prepare a video demonstrating your project:

    • Show and explain your code very briefly and do sample run of your project.

    • Do not exceed 5 minutes.




Submission:



  • Submit one paragraph explain what your project is about and why did you choose this project.

  • Share your work cited.

  • A zip file of your project folder.

    • For Greenfoot, make sure to create a GFAR file and submit. You can do that by going to File -> Share and click on the Greenfoot tab and then click on export



  • A video demonstrating your project. Details above


Final Project is due on ...


Resources:


Here is a useful screen-casting software:https://obsproject.com/



Final Project Samples





Hi everyone,



Please see this link to some sample final projects from last semester.




https://drive.google.com/drive/folders/13a7S4TMgy8GP9ur5ix0OUW1eODoDm0Aq?usp=sharing






Please use Greenfoot program to do this project.

Answered Same DayMay 09, 2021

Answer To: Using your knowledge and skills you acquired in this class, create a Java project in any theme or...

Aditya answered on May 12 2021
131 Votes
SpaceGame/Counter.class
public synchronized class Counter extends greenfoot.Actor {
int score;
public void Counter();
public void act();
public void addScore();
public void checkScore();
}
SpaceGame/Counter.ctxt
#BlueJ class context
comment0.target=Counter
comment0.text=\r\n\ Write\ a\ description\ of\ class\ Counter\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n
comment1.params=
comment1.target=void\ act()
comment2.params=
comment2.target=void\ addScore()
comment2.text=\r\n\ addScore\ -\ it\ increm
ent\ the\ score\ by\ 1\ always\ when\ it\ is\ called\r\n
comment3.params=
comment3.target=void\ checkScore()
comment3.text=\r\n\ checkScore\ \=\ It\ check\ for\ winner\ that\ is\ when\ score\ is\ 10\ it\ calls\ the\ GameWinner\ default\ constructor\ and\ the\ stops\ the\ game\r\n
numComments=4
SpaceGame/Counter.java
SpaceGame/Counter.java
import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
 * Write a description of class Counter here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Counter extends Actor
{
    /**
     * Act - do whatever the Counter wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    int score =0;// counter to store the score
    public void act() 
    {
        // Add your action code here.
        setImage(new GreenfootImage("Score :"+score,24,Color.GREEN,Color.BLACK));// this option make a counter image with font color green and background color black
        checkScore();
    }

    /**
     * addScore - it increment the score by 1 always when it is called
     */
    public void addScore()
    {
        score++;// it always increase the score by 1 when ever this method is called
    }

    /**
     * checkScore = It check for winner that is when score is 10 it calls the GameWinner default constructor and the stops the game
     */
    public void checkScore()
    {
        if(score == 10)
        {
            World myWorld;// creates World object
            myWorld = getWorld();
            GameWinner gamewinner = new GameWinner();// creates GameWinner Objects
            myWorld.addObject(gamewinner, myWorld.getWidth()/2, myWorld.getHeight()/2);// place the GameWinner Object at the center of world
            Greenfoot.stop();// stops the game
        }
    }
}
SpaceGame/GameOver.class
public synchronized class GameOver extends greenfoot.Actor {
public void GameOver();
}
SpaceGame/GameOver.ctxt
#BlueJ class context
comment0.target=GameOver
comment0.text=\r\n\ Write\ a\ description\ of\ class\ GameOver\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n
comment1.params=
comment1.target=GameOver()
comment1.text=\r\n\ GameOver\ -\ This\ is\ a\ default\ construtor\ which\ create\ a\ images\ with\ text\ Game\ over\ of\ font\ color\ white\ and\ background\ color\ black\ \r\n
numComments=2
SpaceGame/GameOver.java
SpaceGame/GameOver.java
import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
 * Write a description of class GameOver here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class GameOver extends Actor
{
    /**
     * GameOver - This is a default construtor which create a images with text Game over of font color white and background color black 
     */
    public GameOver()// default contructor 
    {
        // Add your action code here.
        setImage(new GreenfootImage("Game Over",48,Color.WHITE,Color.BLACK)); 

    } 
}
SpaceGame/GameWinner.class
public synchronized class GameWinner extends greenfoot.Actor {
public void GameWinner();
}
SpaceGame/GameWinner.ctxt
#BlueJ class context
comment0.target=GameWinner
comment0.text=\r\n\ Write\ a\ description\ of\ class\ GameWinner\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n
comment1.params=
comment1.target=GameWinner()
comment1.text=\r\n\ GameWinner\ -\ this\ is\ a\ default\ contructor\ which\ display\ the\ messge\ winner\ of\ font\ color\ white\ and\ background\ color\ black\r\n
numComments=2
SpaceGame/GameWinner.java
SpaceGame/GameWinner.java
import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
 * Write a description of class GameWinner here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class GameWinner extends Actor
{
    /**
     * GameWinner - this is a default contructor which display the messge winner of font color white and background color black
     */
    public GameWinner() 
    {
        // Add your action code here.
        setImage(new GreenfootImage("Winner",48,Color.WHITE,Color.BLACK));
    } 
}
SpaceGame/images/ppl1.png
SpaceGame/images/rock.png
SpaceGame/images/rocket.png
SpaceGame/images/space1.jpg
SpaceGame/MyWorld.class
public synchronized class MyWorld extends greenfoot.World {
Counter counter;
public void MyWorld();
public Counter getCounter();
private void prepare();
}
SpaceGame/MyWorld.ctxt
#BlueJ class context
comment0.target=MyWorld
comment0.text=\r\n\ Write\ a\ description\ of\ class\ MyWorld\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n
comment1.params=
comment1.target=MyWorld()
comment1.text=\r\n\ Constructor\ for\ objects\ of\ class\ MyWorld.\r\n\ \r\n
comment2.params=
comment2.target=Counter\ getCounter()
comment3.params=
comment3.target=void\ prepare()
comment3.text=\r\n\ Prepare\ the\ world\ for\ the\ start\ of\ the\ program.\r\n\ That\ is\:\ create\ the\ initial\ objects\ and\ add\ them\ to\ the\...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here