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

  Verilog model of positive-edge-triggered 4-bit ring counter

Write a Verilog model of a positive-edge-triggered 4-bit Ring Counter. Choose one of the two types of ring counter described in the linked Wikipedia article to model: either the Straight Ring (Overbeck) Counter, or the Twisted Ring (Johnson) Count..

  Select a card randomly from the stack

There is a stack of10cards, each given a different number from1to 10. Suppose we select a card randomly from the stack, replace it, and then randomly select another card. What is the probability that the first card is an even number and the second..

  Which societies is more likely to focus on building relation

Which of the following societies is more likely to focus on building long-term relationships in business? In which of the following societies is a professor ore likely to be called by his/her first name?

  Describes the problem being address

Complete a problem analysis that describes the problem being address, and the benefit this system will have for the coaches and administration of the college. When you make a claim in the opening section be sure to follow up or prove it in the bod..

  Describe sharepoint services and various sharepoint options

discuss sharepoint services and various sharepoint options as well as windows media rights management to handle the

  How it would increase or lower the protocol processing load

This solution explores and defines the requirement for routers to support both IPv4 and IPv6 protocol stacks and explains the various types of connections a dual stack router can support, and why such connections are necessary.

  How can each diagram relates to the solution

You are an outside consultant to a large chain of grocery stores. The store's management would like to dynamically check store's inventory from the central office.

  Workplace communication a

Your major project is related to an on-line book/CD/DVD seller. Research a number of currently available website offerings. Keep links and notes related to the websites, as you will be required to write a brief report on your findings.

  Despite increases in computing power

Despite increases in computing power and network bandwidth, many user interfaces are still largely text oriented, with a few icons and illustrations. Discuss at least three reasons why text-oriented interfaces are still the most common.

  Create a work breakdown structure code for each given task

Create a Work Breakdown Structure Code for each task. Determine an overall project duration and duration estimates for each of the tasks. The duration is not to exceed 90 days.

  Why do many projects end up having unreasonable deadlines

Why do many projects end up having unreasonable deadlines? How should a project manager react to unreasonable demands?

  Determine the controllers monitored and controlled variables

Determine five of the controller's monitored and controlled variables. Describe each variable and explain how it is used in the system. Propose five mode classes and five terms that may be helpful in monitoring this system.

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