COMPSCI_2ME3 – Assignment 4 (Solution)

$ 24.99
Category:

Description

COMP SCI 2ME3, SFWR ENG 2AA4
1 Dates and Deadlines
All submissions are made through git, using your own repo located at:
where [macid] should be replaced with your actual macid. The time for all deadlines is 11:59 pm.
2 Introduction
The purpose of this assignment is to design and specify modules for playing the game 2048. An on-line version of 2048 can be found at:
https://play2048.co/
The modules you are required to specify and implement are the Model and View portions of the Model View Controller design pattern. You do not need to write a controller. Your unit tests will take the role of controller. Bonus marks are available if you choose to specify and implement the entire game, including the Controller, or alternatively combining the Controller with the View for a Model View design pattern.
Your specification can assume that you have access to a function random that returns a random number between 0 and 1.
Part 1
Step 1
Submit your design specification, written in LATEX, of the MIS for the game state module and view module. If your specification requires additional modules, you should include their MISes as well. It is up to you to determine your modules interface; that is, you decide on the exported constants, access programs, exceptions etc. You also determine your state variables and specify the semantics for your access program calls. Your design does not need to concern itself with performance. Your specification should be clear, unambiguous, understandable, consistent, complete, validatable and abstract.
At the beginning of your specification document, list the likely changes that you design considers. At this point also give an informal overview of your design. If it is helpful, you can include a diagram of your design, either as a uses relation, or a UML class diagram.
At the end of your design specification, provide answers to the following questions:
1. Draw a UML diagram for the modules in A3.
2. Draw a control flow graph for the convex hull algorithm. The graph should followthe approach used by the Ghezzi et al. textbook. In particular, the code statements should be edges of the graph, not nodes. Code for the convex hull algorithm can be found at: https://startupnextdoor.com/computing-convex-hull-in-python/. To match the diagrams available from Ghezzi, replace the for loop in the code with a while loop.
Part 2
Step 2
Submit Java code that matches the specification given in the previous step. You should also submit code that tests your module(s) using JUnit. You do not need to write unit tests for your View module, although you should test it manually. Document your source code using doxygen. You code should include a makefile, with rules make test and make doc. Performance will not be considered in the grading.
Notes
1. Your git repo is organized with the following directories at the top level: A1, A2, A3, and A4. Your specification and code files should be placed in the A4 folder
2. Please put your name and macid at the top of each of your source files.
3. Your program must work in the ITB labs on mills, as specified for A3.
4. For any figures needed to answer the questions, you can draw them by hand and scan,or you can use software (like draw.io, or Powerpoint, etc) to draw them digitially.
5. As stated above, Bonus grades are available for: • Providing a GUI. If you provide a GUI, your program does not have to work on mills. It is assumed that the TAs will run your software on their local machine. You should document for the TAs what libraries are used for the GUI. You should test your software on another machine, or VM, to make sure that you list all required files.
• Providing a full specification and implementation for the entire game.
6. Any changes to the assignment specification will be announced in class. It is your responsibility to be aware of these changes. Please monitor all pushes to the course git repo.

Reviews

There are no reviews yet.

Be the first to review “COMPSCI_2ME3 – Assignment 4 (Solution)”

Your email address will not be published. Required fields are marked *