Write an application that reads integer values from keyboard

Assignment Help Computer Engineering
Reference no: EM131418794

GUI and Recursion

Read all instructions in this document before starting any coding!

In this assignment, we wrap up the 2048 project. In the third and fourth assignment, you implemented the backend of the game. Now, we will implement the front-end to add some pretty visual effects. This assignment will also include another topic, recursion.

For this assignment you will have two weeks to complete both parts of the assignment. However, this is certainly NOT an assignment intended for one week. Get started early! The GUI implementation can be quite tricky.

Part 1: Reverse Recurse

Write an application that reads integer values from the keyboard into an array whose size is specified by the user (the user may enter fewer integers than the size specified, but not more?) and reverse the elements in the array via two different recursive methods. One method directly modifies the original array.

The other method returns a new array with the elements reversed preserving the original array. Both will use an "ends-and-middle" or "edges-and-center" recursion.

Though the tester code offers a quite complete testing for your code, it doesn't guarantee that your code will receive a 100% score if it passes the tester (though you can assume your code will receive a pretty high score). So you should also design your own edge cases if possible, and test against your code.

Part 2: GUI 2048

After completing this assignment you will have a fully functioning, graphical 2048 game which you can show off to all of your friends and family. You may even want to show a recruiter or two. You will be graded on look and feel of your final game.

For this assignment you will be utilizing the 2048 backend which you completed in PSA4 (Board.java). While we won't be grading you on the correctness of your Board.java file we encourage you to fix any bugs you may still have so that you can have a bug free 2048 game by the end of this PSA. One thing you'll have to make sure you do is place the call to your board's saveBoard() method inside of a try catch statement (since it currently throws an IOException).

GUI

Your GUI is required to show the score, the name of the game (2048), the tiles with values (and colors which change with values). It is also required to display "Game Over" when the game ends.

Events

You will need to be able to handle keyboard events that occur while focused on your Gui Window. Based on the key pressed you will need to either move (if one of the arrow keys is pressed) or save the board if the "s" key is pressed?. Here is the relevant documentation on key code:

https://docs.oracle.com/javafx/2/api/javafx/scene/input/KeyCode.html

In addition to either moving or saving, you will need to print out (to the terminal)? that you are saving by printing:

Saving Board to <filename>

When an arrow key is pressed AND the move was successful? then you will print:

Moving <Direction>

For example, if the right key was pressed but none of the tiles could move right then "Moving Right" would not print.

Part 3: README.md & Short Response

Remember that the audience of the README description is anyone who knows no programming or computer science. As a rule of thumb, write as if you were writing for an impatient 5-year old boy or a non-computer scientist grandmother. This means use absolutely no Java or CSE terms but high-level terms are fine. Ensure you discuss how you tested the program to ensure it was working as expected.

Attachment:- Assignment File.rar

Reference no: EM131418794

Questions Cloud

Understand the role of unions : This exercise has several purposes. The main one is to have you understand the role of unions and assess whether they are relevant today.  By looking at each of the prescribed websites, you should become more familiar with what unions do and how t..
What is extra payoff to cheating on cooperative agreement : Worn out by the voluminous assignments in their Law and Economics class, a group of students agree to share the load. They promise to cooperate in preparing cases, working problem sets and sharing notes. What is the extra payoff to cheating on the co..
Discuss the r v mohan case within the discussion forum : Discuss the R. v. Mohan (1994) case within the weekly discussion forum. Using the appropriate terminology, examine the background, participants, and historical significance of the case in relation to the malingering assessments used in today's for..
Calculate the overall system reliability : A system consists of three subsystems in parallel. Subsystem A has a reliability of 0.98, subsystem B has a reliability of 0.85, and subsystem C has a reliability of 0.88. Calculate the overall system reliability.
Write an application that reads integer values from keyboard : PSA 7: 2048 GUI and Recursion. Write an application that reads integer values from the keyboard into an array whose size is specified by the user (the user may enter fewer integers than the size specified, but not more?) and reverse the elements i..
Determine the overall network reliability : In Figure 3.39, the component reliabilities are A = 0.95, B = 0.97, C = 0.92, D = 0.94, E = 0.90, and F = 0:88. Determine the overall network reliability.
Provision in the wagner or national labor relations act : What do you see as the most important provision in the Wagner or National Labor Relations Act? Support your view with at least one reference
Compute the mann whitney u statistic for the data : Compute the Mann-Whitney U statistic for the following data. The numbers under the Group 1 and Group 2 columns are participant numbers.
Compute the mann whitney u statistic for the given data : Compute the Mann-Whitney U statistic for the following data. The numbers under the Group 1 and Group 2 columns are participant numbers.

Reviews

len1418794

3/8/2017 2:08:24 AM

Note: Submitted code that does not compile will receive a zero without any chance of partial credit. Make sure your code compiles before submitting! Submission Files (Make sure your submission contains all of the files and that they work on the ieng6 lab machines!) ReverseRecurse.java and Gui2048.java.

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd