Implement and use java programming language features

Assignment Help Programming Languages
Reference no: EM132444957

ICT104 - Program Design and Development Programming - Kings Own Institute

Learning Outcomes

a) Analyse and model object-oriented programming using Java
b) Design object-oriented programs using object oriented features such as encapsulation, inheritance and polymorphism in Java
c) Design and develop a well-designed event driven application using Java Applets which correctly implements a solution to a problem defined in a specification
d) Implement and use Java programming language features to design and create Swing Components

Assessment

Assessment type: Programming 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 features using swing and applets. This assessment contributes to learning outcomes c and d.

Assessment topic: Develop Java application based on the given scenario: individual assignment. Task Details:
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: Part 1: A simple console program (no GUI);
Part 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.

Part 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
Please find below an entire program output from start to end to get an idea how algorithm needs to work

Part 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.

Attachment:- Program Design And Development.rar

Reference no: EM132444957

Questions Cloud

Explain how servant leadership can improve communities : Explain how servant leadership can improve communities and society. Why is leadership courage important to realize these changes?
Design solutions for concrete security problems : Design solutions for concrete security problems for distributed applications and Formulate and evaluate security countermeasures to reduce potential security
What could lead to greenleaf theology : What could lead to Greenleaf's theology of institutions becoming a viable model for making societal change? What stands in the way of this idea being achievable
Rokeach values survey : Select values from "Rokeach Values Survey" that will provide foundation of your model and discuss the leadership behaviors that will result from those values
Implement and use java programming language features : Design object-oriented programs using object oriented features such as encapsulation, inheritance and polymorphism in Java
Which findings should the nurse expect : Question - A nurse is caring for a child who has autism spectrum disorder. Which of the following findings should the nurse expect
Equal the stream of installments : Calculate what the lump sum should be so that it would exactly equal the stream of installments. You must show and explain your work to be given credit
What is the policy of import substitution : What is the policy of import substitution? Has this policy worked for the developing countries? If not, what are the problems of this policy?
Analyze the effects of several shocks : A key skill in economics is the ability to use the theory of supply and demand to analyze specific markets. In this assessment, you will demonstrate

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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