ITEC313 Creating A Windows GUI Application: River Crossing Game Programming Assessment 3 Answer

pages Pages: 4word Words: 890

Question :

FACULTY OF LAW & BUSINESS

Peter Faber Business School

ITEC313: Object Oriented Programming, Semester 1, 2020 Assessment 3 [Weight 50%]

Problem Description 

One day a farmer goes to the market, taking with him a cabbage and a goat. On the way he captured a wolf, he’s a mighty farmer, and took it with him to the market. They came to a river. And on the Bank, there’s a boat. Now, the problem is that the boat just big enough to carry the farmer and one of the others. If the farmer leaves the wolf and the goat together, in his absence, the wolf would make a meal of the goat. Neither, could be leave the goat and the cabbage alone: the goat would eat the cabbage. Being used to hardship, the farmer was quite prepared to make several trips back and forth, just so long as he could eventually bring them all to the other side and went on to the market. How should he arrange the trips?

 CLI version of the river crossing

Figure 1. CLI version of the river crossing

River Crossing, Game Programming Assignment

Create a Windows GUI (JFrame) application for launching RiverCrossing game.Windows GUI (JFrame) application for launching RiverCrossing game

Choose GUI components that reduce user errors and provide a feedback to the player. For example, there is no need for a “boat” button because “row” button always moves the boat with or without an item.

One simple GUI interface is shown in the Figure 2 below. Click the button “row” to immediately row the boat across or to transport the wolf select button “wolf” followed by click on the “row” button.

Basic river crossing layout

Figure 2. Basic river crossing layout.

Once again, this is only a sample interface to illustrate the idea of the game. You are free to choose your own colour scheme and buttons. Movement can be achieved by clicking a button. Make use of layout managers to design colourful and a well-organized game. Consider the following controls as a minimum requirement:

  • one button to reset and start the game again,
  • a text field for the player’s name (a player may choose to leave it blank).
  • a text area to display a warning messages (and the past history), for example, “This is not a good idea” or to inform the player that cabbage or the goat was eaten and game is lost. You can provide your own appropriate messages.

An advanced River crossing is shown in Figure 3. Full marks will be given to fully functional basic layout but additional marks may be given by better GUI as long it is fully functional.

advanced River crossing

Figure 3. An example of advanced river crossing layout with button icons (pictures) and boat drawing.

Submission Details and Marking Scheme 

It is compulsory that you demonstrate your work to your lab instructor in week 11 or 12. Submission of the assignment with code and other deliverables (refer to ‘What you have to hand in’ section below) are due on Friday the 15th of May 2020. Emailed submissions will not be accepted. 

The late assignments will be penalised 5% per day. However, if you have a good reason for not finishing on time, you may apply for a Special Consideration. 

What do you have to hand in? 

An electronic copy of 

1. Readme.docx file with information on how to run your program. Include any extra information about your design and program that you wish the marker to know. 

2. Summary of tasks allocations—who did what? 

3. A word document with the evidence of trial runs of your program, i.e., screen printouts of the results where you have tested all the features of your code. 

4. UML diagram for all classes in your program. 

5. Code for all the classes that has been compiled and are ready to run. (jGRASP will be used to run and test your application). 

6. A brief description of the class. At the start of each method, there should be a comment clearly describing what the method does. Each class should be fully documented commencing with a heading. In particular, the heading should include your name, unit, assignment details, date written and a brief description of the class. At the start of each method, there should be a comment clearly describing what the method does. If you have a partner, their name and student number is should be clearly identified in the heading beside your name 

Show More