Design a ui using java swing components


Assignment Purpose: This assessment will allow students to demonstrate their understanding of Java programming and object-oriented concepts, the use of list classes in collection framework, and the use of graphical feature using swing and applets. This assessment contributes to Learning Outcomes c and d.

Develop Java application based on the given scenario: individual assignment

Assignment Task:

The context for this assignment (Part 1 and Part 2) is a 'Beer Bottles Game Development' for calculating and displaying a LOSER. This assignment will test a student's knowledge of and skills in writing application software for a task, understanding the business rules of a particular problem, coding these in a computer program, developing a graphical user interface.

For this assignment, students will use the Java programming language and development will be on the NetBeans IDE platform.

This assignment consists of 2 stages,

  • Stage 1: A simple console program (no GUI)
  • Stage 2: The same but wrapped in a GUI

Beer Bottles Game Development

Preamble:

1. In this game, there are 21 Beer bottles and 2 players - You and Computer.

2. You and Computer would pick up the Beer bottles one by one.

3. At a time, any number of beer bottles can be picked up between 1 and 4 (inclusive)

4. The one, who will have to pick up the last bottle, is the loser and will have to pay the bill.

Design and implement a game, making use of Artificially Intelligent algorithm, so that if user is playing first, then the Computer would pick up the bottles intelligently each time, and the Computer would always Win. The Computer would never Lose.

Stage 1: Design a Java application, which would display below message at the start of the game.

There are 21 beer bottles.

Computer and yourself, there are 2 players

At a time, each one can pick up any number of bottles between 1 and 4 (inclusive)

Will you like to play first?

If the User types 'Yes' and presses 'Enter' key, the next lines of output would be

Will you like to play first? Yes

How many you would like to pick up?

If you pick up 3 bottles initially and press 'Enter' to observe how many the Computer picks now, then as per your intelligent algorithm, the Computer needs to pick up any number of bottles between 1 and 4 (inclusive), so that at the end, the Computer would WIN. The next set of output would be.

How many you would like to pick up? 3

Computer has picked 2

The bottles remaining are: 16

How many you would like to pick up?

The User must be able to continue the game with Computer, and at every step the remaining bottles need to be displayed appropriately. The number of remaining bottles would get decreased at each step.

How many you would like to pick up? 2

Computer has picked 3

The bottles remaining are: 11

How many you would like to pick up? 3

Computer has picked 2

The bottles remaining are: 6

How many you would like to pick up? 4

Computer has picked 1

As per this artificially intelligent program, the Computer should always Win and Never Lose. If User will have to pick up the last beer bottle, then User is Loser and would have to pay the bill.

Computer has picked 1

The bottles remaining are: 1

You will have to pick up the last.. You are loser

Stage 2: Design a UI using Java Swing components, which would look like below.

If you pick up 3 bottles initially and click the button "Pick" to observe how many the Computer picks now, then as per your intelligent algorithm, the Computer needs to pick up any number of bottles between 1 and 4 (inclusive), so that at the end, the Computer would WIN. The UI would be as below.

The User must be able to continue the game with Computer, and at every step the remaining bottles need to be displayed appropriately. The number of remaining bottles would get decreased at each step.

As per this artificially intelligent program, the Computer should always Win and Never Lose. If User will have to pick up the last beer bottle, then User is Loser and would have to pay the bill.

Are you too pursuing your degree program from this university and often struggle with your academic tasks and feel stressed. Then, your must avail our Program Design and Development Programming Assignment Help service for better academic grades.

Tags: Program Design and Development Programming Assignment Help, Program Design and Development Programming Homework Help, Program Design and Development Programming Coursework, Program Design and Development Programming Solved Assignments, Java Programming Assignment Help, Java Programming Homework Help

Attachment:- Java application.rar

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Design a ui using java swing components
Reference No:- TGS03030199

Expected delivery within 24 Hours