Ask a question from expert

Ask now

Netbeans Project Implemented CODE: Assignment

7 Pages3497 Words353 Views
   

Added on  2019-09-18

Netbeans Project Implemented CODE: Assignment

   Added on 2019-09-18

BookmarkShareRelated Documents
6COM1037 OO developmentCoursework 1 Nov 2016Champions of Disc Earth - CODE1.The Assignment Produce a Netbeans project implementing the specified version of CODE by completing tasks described below. Your project must be capable of running correctly using the software in UH labs.Your CODE project should display the qualities associated with good program design. Your program code should: minimise code duplication and be modularised so that components have low coupling and high cohesion. use inheritance, abstract classes and interfaces, as appropriate.be reusable and easy to maintain.be well documented, displaying both agreed standards of internal documentation and good use of the facilities available in Javadoc.The project you submit must compile. If your project does not compile, you will not be able to perform in the demo. You must attend the demonstration session. If you do not attend your designated demonstration session, you will get ZERO marksThe project oodcwk-studentscontainstheCODEinterface , a Player class, a GameUI class to help with testing, some enum classes, MyTester which can also be used for testing and a Teamwork class. GameIOcompiles, but will only provide results when you have implemented appropriate methods in Player and loaded somedata. You should not change the code provided (except as instructed).2.Pair ProgrammingComplete this assignment by working in pairs. Submissions by single students, or larger groups will not be accepted.For pair programming to be successful, members of a pair must be able to work together, at the same computer, for suitably long periods of time. You should also vary who actually types in the code and who is observing/advising. This technique works best if the skill levels of the pair are roughly equivalent. If there is a wide disparity between skill levels there is a high probability that the weaker of the pair will not learn anything, while the stronger will do all of the work. This will not prepare the weaker partner for the tasks in the demo session, or for future assessments. Before you start of the assignment please edit the Teamwork class by replacing the Strings in the array with details appropriate for your pair. If you complete this incorrectly, you may receive ZERO marks.You must EACH submit the same project to Studynet by the deadline.Tasks in the demo session must be completed individually.3.Test First DevelopmentThe code in this project is complicated to mark by inspection, so its functionality will be marked professionally by running testing software. This software will be testing your implementation of the Gameinterface. However, in order to implement the interface in line with OO design principles, you should add some lower level supplier classes. If you try to just write everything in Player, the code will be horrendously complex and totally unmaintainable (and not get good marks for design).Since you don’t yet know how to do professional testing, you have been given a tester class MyTester and a text file with the expected results of all tests. This tester class does not need to know anything about your implementation as it is written to the Game interface. The software which we will use to test your code (and award marks) will perform the similar tests, but use different data. When you have implemented some method in the interface, you would be wise to test it using appropriate tests in MyTester to see whether it gives the same results. The essence of “test first development” is that you write code to produce the expected results - so you should at least look at them.You have also been given a user interface class GameUI, which you can use to test your code with keyboard input. However, there is no point in testing if you don’t know the expected results. So you should use MyTester to see whatresults are to be expected from the given test data.NOTE: tests in MyTester are designed to be as independent as possible so that they don’t contaminate each other. Each MyTester test starts by creating a fresh new Player object which is not contaminated by the results of any Page 1
Netbeans Project Implemented CODE: Assignment_1
6COM1037 OO developmentCoursework 1 Nov 2016previous tests. If you want to get similar results using GameUI, you must to “quit” and restart GameUI for each test.Page 2
Netbeans Project Implemented CODE: Assignment_2
6COM1037 OO developmentCoursework 1 Nov 20164.Game Description“Champions of Disc Earth” (CODE) is a strategy game. The current prototype provides a very simplified version of the game for one player. Here is the briefing provided for a player of this version of the game: You are the ruler of Disc Earth. Your kingdom is assaulted by a variety of enemies who provide different types of challenges. To protect your kingdom, you must assemble an army of champions who can meet (and hopefully win) these challenges from your enemies. The game provides a collection of champions whom you can hire.At the start of the game you have a fixed amount of money (1000 gulden) in your treasury which can be used to hire champions. To add a champion to your army, you have to use the money in your treasury to pay their hire fee. Once you have an army, you will be expected to meet some challenges. Winning a challenge will bring you rewards, and increase your treasury. If you lose a challenge, you have to pay the reward money to your enemy and lose it from your treasury. At any point in the game, you can hire or discharge champions. If you discharge a champion, you can get them to pay you back half of their hire fee. So when you need money, you can discharge champions if they are in your army, but not if they are dead or already available for hire. The skill in this version is in assembling your army in a way which enables you to win challenges and increase your treasury. Your enemies offer different types of challenges. Each challenge has a unique number, the name of the enemy, a type (Magic, Fight or Mystery), a required skill level, and a reward. In this game prototype, you will need to select a challenge by number (later versions will select challenges for you at random). Your game should then choose the first available champion in your army who can meet the challenge and compare the skill levels. The results of meeting a challenge will be one of the following:“Challenge won by...“ – add reward to treasury, return name of champion “Challenge lost as no suitable champion available” – deduct reward from treasury“Challenge lost on skill level” - deduct reward from treasury and set your champion to "dead"Champions can be one of the following types: Wizard, Warrior or Dragon (more types to be added later). The table below shows which type of challenge they can meet:MagicFightMysteryWizardyesyesyesWarriornoyesnoDragonnoyesOnly if they talkEach champion has a unique name, a skill level, a hire fee. Wizards have a hire fee of 300 gulden, but if they are also necromancers their fee is 400 gulden. They also have a speciality. Warriors set their own hire fee, and you also need tostore their preferred weapon. Dragons have a fixed hire fee of 500 gulden, and some of them can talk. Each champion has a skill level recorded as a number from 1 to 10. All dragons have a skill level of 7. A warrior's skill level is their hire fee divided by 100(ignoring remainders). Wizards have different skill levels. See Appendix A for sample data.Champions are in one of the following states:for hire – is in the game’s collection of champions but not yet hired for your armyactive – has been hired for your army and is available to meet challengesdead – is not available for challenges, cannot be restoredChallenge numbers should be sequential from 1. Challenges can be met more than onceAfter losing a challenge, your treasury may be <0. You cannot buy any more champions. However, you can continue tomeet challenges with your remaining champions in the hope of winning some more money (even if your treasury goes further into debt). You may also make money by discharging champions. However, if your treasury has no money or is in debt, and you have no champions to discharge, then you have lost the game and a suitable message should be output. 5.Scope This early working version of the game requires the player to select the challenge (by number). This has been done to make it possible to design a standard set of tests. Programs with "random" features are difficult to test because of their unpredictability. Once the game is fully tested, a “random” element can be introduced. You are NOT required to do this.In future, the condition for "winning" the game will be to meet all the challenges and still have money left in the treasury.You are NOT required to implement this feature of the game.In future, when a player has lost, the game will automatically terminate after displaying an appropriate message. You are NOT required to ensure the game terminates, but will be expected to display a suitable message.Page 3
Netbeans Project Implemented CODE: Assignment_3

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Implementation of Interface for a JAVA Game Assignment
|3
|804
|399

C# Desktop Application for Airplane Seat Assignment
|2
|524
|154

MITS4002 Activity 03.
|3
|402
|159

Java Restaurant Billing Management System Coursework
|4
|794
|179

MITS4002 Activity 07.
|3
|414
|301

EEE/CSE 120 Design Project
|5
|1535
|470