SlideShare a Scribd company logo
Deliverables
To complete this assignment you must submit your compressed
Netbeans project to Webcourses. This requires you to submit a
.zip, .rar, .tar, .tgz. etc… of the
ENTIRE
project. Individual source code files will not be accepted.
Introduction
This assignment is to develop a User Interface using classes
from the javax.swing package.
Tasks and Rubric
Activity
userInterface
package
BattleshipUI.java
Add an import for
1.
core.BattleshipClient
2.
core.Ship
Create an ActionListener for the Deploy Ships button that does
the following:
1.
Disables the UI components on the JPanel with ship selection
options
2.
Add a JPanel to the right of Player One’s button board with a
JTextArea for displaying the game status to the user
3.
Add a JPanel to the right of the game status with Player Two’s
button board
4.
Call the play() method in class BattleshipClient
In the ActionListener for the Game Menu set the player mode
based on what the user selected, the options are:
Player versus Player
Player versus Computer
Computer versus Computer
Example code:
if(e.getActionCommand().equals("Player vs. Player"))
{
players[Constants.PLAYER_ONE].setPlayMode(Constants.HU
MAN);
players[Constants.PLAYER_TWO].setPlayMode(Constants.HU
MAN);
}
Player.java
Add a class member to store the player’s mode, human or
computer; create getter/setter for the class member
Create a method that will automatically layout the ships for
when the player mode is set to computer using the Random class
to randomly select the direction and location for the
startRowClick and startColumnClick; make sure the auto layout
uses null for the color
PlayerOptionDialog.java
Update the UI so that it reflects the saved data for each Player
core
package
BattleshipClient.java
This class controls the game being played
Create a custom constructor that takes two parameters, an Array
of class Player and class BattleshipUI
Create a method play() to manage the play between Player One
and Player Two; for this iteration only Human versus Computer
has to function
When a JButton has been selected/clicked:
1.
if it is a hit
a.
change the background color to something other than the default
gray(i.e. null) and the ship color (e.g.Color.BLACK)
b.
update the object instance so that the number of hits is
increased or the hits left is decreased
2.
if it is a miss
a.
change the background color to something other than the default
gray (i.e. null), the ship color, or the color used for a hit
When a ship has 0 (zero) hits left or has taken the max number
of hits update the ship so that isSunk = true; notify the user
when each of their ships has been sunk
Whichever player sinks all five opponent’s ships first wins the
game!
functionality
Compiles
Source compiles with no errors
Runs
Source runs with no errors
Comments
Source includes comments
Total
Figures
Figure
1
Initial display
Figure
2
Deployed Ships
Figure
3
Display Game Status and Player Two Panels
Figure
4
Play Between Human and Computer
Figure
5
End of Game
Figure
6
Player Options Dialog Before Player Selection
Figure
7
Player Options Dialog After Player Selection

More Related Content

Similar to DeliverablesTo complete this assignment you must submit your com.docx

Multiplayer Networking Game
Multiplayer Networking GameMultiplayer Networking Game
Multiplayer Networking GameTanmay Krishna
 
Chapt 6 game testing and publishing
Chapt 6   game testing and publishingChapt 6   game testing and publishing
Chapt 6 game testing and publishingMuhd Basheer
 
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdfWorking with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdfudit652068
 
The Ring programming language version 1.4 book - Part 14 of 30
The Ring programming language version 1.4 book - Part 14 of 30The Ring programming language version 1.4 book - Part 14 of 30
The Ring programming language version 1.4 book - Part 14 of 30Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 36 of 84
The Ring programming language version 1.2 book - Part 36 of 84The Ring programming language version 1.2 book - Part 36 of 84
The Ring programming language version 1.2 book - Part 36 of 84Mahmoud Samir Fayed
 
WP7 HUB_XNA overview
WP7 HUB_XNA overviewWP7 HUB_XNA overview
WP7 HUB_XNA overviewMICTT Palma
 
The games factory 2 alien wars
The games factory 2 alien warsThe games factory 2 alien wars
The games factory 2 alien warsChaffey College
 
What Would Blizzard Do
What Would Blizzard DoWhat Would Blizzard Do
What Would Blizzard DoNick Pruehs
 
i need a taking turn method for a player vs computer battleship game.pdf
i need a taking turn method for a player vs computer battleship game.pdfi need a taking turn method for a player vs computer battleship game.pdf
i need a taking turn method for a player vs computer battleship game.pdfpetercoiffeur18
 
Unit 72 my computer game user guide (1) (4)
Unit 72 my computer game user guide (1) (4)Unit 72 my computer game user guide (1) (4)
Unit 72 my computer game user guide (1) (4)Lewis Brierley
 
Android game development
Android game developmentAndroid game development
Android game developmentdmontagni
 
Introduction to Unity3D and Building your First Game
Introduction to Unity3D and Building your First GameIntroduction to Unity3D and Building your First Game
Introduction to Unity3D and Building your First GameSarah Sexton
 
Building your first game in Unity 3d by Sarah Sexton
Building your first game in Unity 3d  by Sarah SextonBuilding your first game in Unity 3d  by Sarah Sexton
Building your first game in Unity 3d by Sarah SextonBeMyApp
 
Readme win
Readme winReadme win
Readme winseba16
 
Fps tutorial 1
Fps tutorial 1Fps tutorial 1
Fps tutorial 1unityshare
 
Unity遊戲程式設計 - 2D platformer game
Unity遊戲程式設計 - 2D platformer gameUnity遊戲程式設計 - 2D platformer game
Unity遊戲程式設計 - 2D platformer game吳錫修 (ShyiShiou Wu)
 

Similar to DeliverablesTo complete this assignment you must submit your com.docx (20)

Multiplayer Networking Game
Multiplayer Networking GameMultiplayer Networking Game
Multiplayer Networking Game
 
Chapt 6 game testing and publishing
Chapt 6   game testing and publishingChapt 6   game testing and publishing
Chapt 6 game testing and publishing
 
WP7 HUB_XNA
WP7 HUB_XNAWP7 HUB_XNA
WP7 HUB_XNA
 
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdfWorking with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
 
The Ring programming language version 1.4 book - Part 14 of 30
The Ring programming language version 1.4 book - Part 14 of 30The Ring programming language version 1.4 book - Part 14 of 30
The Ring programming language version 1.4 book - Part 14 of 30
 
The Ring programming language version 1.2 book - Part 36 of 84
The Ring programming language version 1.2 book - Part 36 of 84The Ring programming language version 1.2 book - Part 36 of 84
The Ring programming language version 1.2 book - Part 36 of 84
 
WP7 HUB_XNA overview
WP7 HUB_XNA overviewWP7 HUB_XNA overview
WP7 HUB_XNA overview
 
The games factory 2 alien wars
The games factory 2 alien warsThe games factory 2 alien wars
The games factory 2 alien wars
 
Readme win[1]
Readme win[1]Readme win[1]
Readme win[1]
 
What Would Blizzard Do
What Would Blizzard DoWhat Would Blizzard Do
What Would Blizzard Do
 
Unity3 d devfest-2014
Unity3 d devfest-2014Unity3 d devfest-2014
Unity3 d devfest-2014
 
i need a taking turn method for a player vs computer battleship game.pdf
i need a taking turn method for a player vs computer battleship game.pdfi need a taking turn method for a player vs computer battleship game.pdf
i need a taking turn method for a player vs computer battleship game.pdf
 
Unit 72 my computer game user guide (1) (4)
Unit 72 my computer game user guide (1) (4)Unit 72 my computer game user guide (1) (4)
Unit 72 my computer game user guide (1) (4)
 
Android game development
Android game developmentAndroid game development
Android game development
 
Introduction to Unity3D and Building your First Game
Introduction to Unity3D and Building your First GameIntroduction to Unity3D and Building your First Game
Introduction to Unity3D and Building your First Game
 
Building your first game in Unity 3d by Sarah Sexton
Building your first game in Unity 3d  by Sarah SextonBuilding your first game in Unity 3d  by Sarah Sexton
Building your first game in Unity 3d by Sarah Sexton
 
Readme win
Readme winReadme win
Readme win
 
Fps tutorial 1
Fps tutorial 1Fps tutorial 1
Fps tutorial 1
 
Tdd in unity
Tdd in unityTdd in unity
Tdd in unity
 
Unity遊戲程式設計 - 2D platformer game
Unity遊戲程式設計 - 2D platformer gameUnity遊戲程式設計 - 2D platformer game
Unity遊戲程式設計 - 2D platformer game
 

More from petehbailey729071

Does facial recognition violates our right to privacy  Incl.docx
Does facial recognition violates our right to privacy  Incl.docxDoes facial recognition violates our right to privacy  Incl.docx
Does facial recognition violates our right to privacy  Incl.docxpetehbailey729071
 
Dont Blame the Eater By DAVID ZINCZENKO NOV. 23, 2002.docx
Dont Blame the Eater By DAVID ZINCZENKO NOV. 23, 2002.docxDont Blame the Eater By DAVID ZINCZENKO NOV. 23, 2002.docx
Dont Blame the Eater By DAVID ZINCZENKO NOV. 23, 2002.docxpetehbailey729071
 
Domestic TravelVisit the Travel Facts and Statistics website.docx
Domestic TravelVisit the Travel Facts and Statistics website.docxDomestic TravelVisit the Travel Facts and Statistics website.docx
Domestic TravelVisit the Travel Facts and Statistics website.docxpetehbailey729071
 
Don Marquis, in Why Abortion is Immoral,” champions an account of t.docx
Don Marquis, in Why Abortion is Immoral,” champions an account of t.docxDon Marquis, in Why Abortion is Immoral,” champions an account of t.docx
Don Marquis, in Why Abortion is Immoral,” champions an account of t.docxpetehbailey729071
 
Dollar General has been working to fashion itself into a one-stop sh.docx
Dollar General has been working to fashion itself into a one-stop sh.docxDollar General has been working to fashion itself into a one-stop sh.docx
Dollar General has been working to fashion itself into a one-stop sh.docxpetehbailey729071
 
Dodge, M., Bosick, S., Antwerp, V., & Benson, M. (2013). Do Men an.docx
Dodge, M., Bosick, S., Antwerp, V., & Benson, M. (2013). Do Men an.docxDodge, M., Bosick, S., Antwerp, V., & Benson, M. (2013). Do Men an.docx
Dodge, M., Bosick, S., Antwerp, V., & Benson, M. (2013). Do Men an.docxpetehbailey729071
 
Does Ex Parte Quirin justify the treatment of detainees at Guant.docx
Does Ex Parte Quirin justify the treatment of detainees at Guant.docxDoes Ex Parte Quirin justify the treatment of detainees at Guant.docx
Does Ex Parte Quirin justify the treatment of detainees at Guant.docxpetehbailey729071
 
Documentation of at least four initial scholarly sources from the .docx
Documentation of at least four initial scholarly sources from the .docxDocumentation of at least four initial scholarly sources from the .docx
Documentation of at least four initial scholarly sources from the .docxpetehbailey729071
 
Documents of United States Indian Policy (Third Edition) Fra.docx
Documents of United States Indian Policy (Third Edition) Fra.docxDocuments of United States Indian Policy (Third Edition) Fra.docx
Documents of United States Indian Policy (Third Edition) Fra.docxpetehbailey729071
 
Documentation Artifact 5Long Term Care Plan-Continuing to .docx
Documentation Artifact 5Long Term Care Plan-Continuing to .docxDocumentation Artifact 5Long Term Care Plan-Continuing to .docx
Documentation Artifact 5Long Term Care Plan-Continuing to .docxpetehbailey729071
 
Doctorate Level Questions No Plagiarism....Paraphrase the cont.docx
Doctorate Level Questions No Plagiarism....Paraphrase the cont.docxDoctorate Level Questions No Plagiarism....Paraphrase the cont.docx
Doctorate Level Questions No Plagiarism....Paraphrase the cont.docxpetehbailey729071
 
DOCUMENT-BASED QUESTION RUBRIC   5  4  3  2  1 ·​ .docx
DOCUMENT-BASED QUESTION RUBRIC   5  4  3  2  1 ·​   .docxDOCUMENT-BASED QUESTION RUBRIC   5  4  3  2  1 ·​   .docx
DOCUMENT-BASED QUESTION RUBRIC   5  4  3  2  1 ·​ .docxpetehbailey729071
 
DOCUMENT 4Dwight D. Eisenhower, Farewell Address to the Nation” (.docx
DOCUMENT 4Dwight D. Eisenhower, Farewell Address to the Nation” (.docxDOCUMENT 4Dwight D. Eisenhower, Farewell Address to the Nation” (.docx
DOCUMENT 4Dwight D. Eisenhower, Farewell Address to the Nation” (.docxpetehbailey729071
 
docsch09.pptxManaging and Using Information Systems A St.docx
docsch09.pptxManaging and Using Information Systems A St.docxdocsch09.pptxManaging and Using Information Systems A St.docx
docsch09.pptxManaging and Using Information Systems A St.docxpetehbailey729071
 
Doc with options for readings and films attached.Option 1 - .docx
Doc with options for readings and films attached.Option 1 - .docxDoc with options for readings and films attached.Option 1 - .docx
Doc with options for readings and films attached.Option 1 - .docxpetehbailey729071
 
Do you support or oppose the death penaltyRequirementsYo.docx
Do you support or oppose the death penaltyRequirementsYo.docxDo you support or oppose the death penaltyRequirementsYo.docx
Do you support or oppose the death penaltyRequirementsYo.docxpetehbailey729071
 
Do you think it is possible that this pandemic might end up working .docx
Do you think it is possible that this pandemic might end up working .docxDo you think it is possible that this pandemic might end up working .docx
Do you think it is possible that this pandemic might end up working .docxpetehbailey729071
 
Do you think that mandating the construction of such IA-centric or.docx
Do you think that mandating the construction of such IA-centric or.docxDo you think that mandating the construction of such IA-centric or.docx
Do you think that mandating the construction of such IA-centric or.docxpetehbailey729071
 
Do you think there is a victimless crime, if so, what is it and what.docx
Do you think there is a victimless crime, if so, what is it and what.docxDo you think there is a victimless crime, if so, what is it and what.docx
Do you think there is a victimless crime, if so, what is it and what.docxpetehbailey729071
 
Do you believe that people in South Florida have different sorts of .docx
Do you believe that people in South Florida have different sorts of .docxDo you believe that people in South Florida have different sorts of .docx
Do you believe that people in South Florida have different sorts of .docxpetehbailey729071
 

More from petehbailey729071 (20)

Does facial recognition violates our right to privacy  Incl.docx
Does facial recognition violates our right to privacy  Incl.docxDoes facial recognition violates our right to privacy  Incl.docx
Does facial recognition violates our right to privacy  Incl.docx
 
Dont Blame the Eater By DAVID ZINCZENKO NOV. 23, 2002.docx
Dont Blame the Eater By DAVID ZINCZENKO NOV. 23, 2002.docxDont Blame the Eater By DAVID ZINCZENKO NOV. 23, 2002.docx
Dont Blame the Eater By DAVID ZINCZENKO NOV. 23, 2002.docx
 
Domestic TravelVisit the Travel Facts and Statistics website.docx
Domestic TravelVisit the Travel Facts and Statistics website.docxDomestic TravelVisit the Travel Facts and Statistics website.docx
Domestic TravelVisit the Travel Facts and Statistics website.docx
 
Don Marquis, in Why Abortion is Immoral,” champions an account of t.docx
Don Marquis, in Why Abortion is Immoral,” champions an account of t.docxDon Marquis, in Why Abortion is Immoral,” champions an account of t.docx
Don Marquis, in Why Abortion is Immoral,” champions an account of t.docx
 
Dollar General has been working to fashion itself into a one-stop sh.docx
Dollar General has been working to fashion itself into a one-stop sh.docxDollar General has been working to fashion itself into a one-stop sh.docx
Dollar General has been working to fashion itself into a one-stop sh.docx
 
Dodge, M., Bosick, S., Antwerp, V., & Benson, M. (2013). Do Men an.docx
Dodge, M., Bosick, S., Antwerp, V., & Benson, M. (2013). Do Men an.docxDodge, M., Bosick, S., Antwerp, V., & Benson, M. (2013). Do Men an.docx
Dodge, M., Bosick, S., Antwerp, V., & Benson, M. (2013). Do Men an.docx
 
Does Ex Parte Quirin justify the treatment of detainees at Guant.docx
Does Ex Parte Quirin justify the treatment of detainees at Guant.docxDoes Ex Parte Quirin justify the treatment of detainees at Guant.docx
Does Ex Parte Quirin justify the treatment of detainees at Guant.docx
 
Documentation of at least four initial scholarly sources from the .docx
Documentation of at least four initial scholarly sources from the .docxDocumentation of at least four initial scholarly sources from the .docx
Documentation of at least four initial scholarly sources from the .docx
 
Documents of United States Indian Policy (Third Edition) Fra.docx
Documents of United States Indian Policy (Third Edition) Fra.docxDocuments of United States Indian Policy (Third Edition) Fra.docx
Documents of United States Indian Policy (Third Edition) Fra.docx
 
Documentation Artifact 5Long Term Care Plan-Continuing to .docx
Documentation Artifact 5Long Term Care Plan-Continuing to .docxDocumentation Artifact 5Long Term Care Plan-Continuing to .docx
Documentation Artifact 5Long Term Care Plan-Continuing to .docx
 
Doctorate Level Questions No Plagiarism....Paraphrase the cont.docx
Doctorate Level Questions No Plagiarism....Paraphrase the cont.docxDoctorate Level Questions No Plagiarism....Paraphrase the cont.docx
Doctorate Level Questions No Plagiarism....Paraphrase the cont.docx
 
DOCUMENT-BASED QUESTION RUBRIC   5  4  3  2  1 ·​ .docx
DOCUMENT-BASED QUESTION RUBRIC   5  4  3  2  1 ·​   .docxDOCUMENT-BASED QUESTION RUBRIC   5  4  3  2  1 ·​   .docx
DOCUMENT-BASED QUESTION RUBRIC   5  4  3  2  1 ·​ .docx
 
DOCUMENT 4Dwight D. Eisenhower, Farewell Address to the Nation” (.docx
DOCUMENT 4Dwight D. Eisenhower, Farewell Address to the Nation” (.docxDOCUMENT 4Dwight D. Eisenhower, Farewell Address to the Nation” (.docx
DOCUMENT 4Dwight D. Eisenhower, Farewell Address to the Nation” (.docx
 
docsch09.pptxManaging and Using Information Systems A St.docx
docsch09.pptxManaging and Using Information Systems A St.docxdocsch09.pptxManaging and Using Information Systems A St.docx
docsch09.pptxManaging and Using Information Systems A St.docx
 
Doc with options for readings and films attached.Option 1 - .docx
Doc with options for readings and films attached.Option 1 - .docxDoc with options for readings and films attached.Option 1 - .docx
Doc with options for readings and films attached.Option 1 - .docx
 
Do you support or oppose the death penaltyRequirementsYo.docx
Do you support or oppose the death penaltyRequirementsYo.docxDo you support or oppose the death penaltyRequirementsYo.docx
Do you support or oppose the death penaltyRequirementsYo.docx
 
Do you think it is possible that this pandemic might end up working .docx
Do you think it is possible that this pandemic might end up working .docxDo you think it is possible that this pandemic might end up working .docx
Do you think it is possible that this pandemic might end up working .docx
 
Do you think that mandating the construction of such IA-centric or.docx
Do you think that mandating the construction of such IA-centric or.docxDo you think that mandating the construction of such IA-centric or.docx
Do you think that mandating the construction of such IA-centric or.docx
 
Do you think there is a victimless crime, if so, what is it and what.docx
Do you think there is a victimless crime, if so, what is it and what.docxDo you think there is a victimless crime, if so, what is it and what.docx
Do you think there is a victimless crime, if so, what is it and what.docx
 
Do you believe that people in South Florida have different sorts of .docx
Do you believe that people in South Florida have different sorts of .docxDo you believe that people in South Florida have different sorts of .docx
Do you believe that people in South Florida have different sorts of .docx
 

Recently uploaded

UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...Sayali Powar
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...Denish Jangid
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxCapitolTechU
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePedroFerreira53928
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya - UEM Kolkata Quiz Club
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resourcesdimpy50
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasiemaillard
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersPedroFerreira53928
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesRased Khan
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxricssacare
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxJenilouCasareno
 
Keeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security ServicesKeeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security ServicesTechSoup
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportAvinash Rai
 
Open Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointOpen Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointELaRue0
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online PresentationGDSCYCCE
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxShibin Azad
 

Recently uploaded (20)

UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resources
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matrices
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
 
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
Keeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security ServicesKeeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security Services
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
 
Open Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointOpen Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPoint
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptx
 

DeliverablesTo complete this assignment you must submit your com.docx

  • 1. Deliverables To complete this assignment you must submit your compressed Netbeans project to Webcourses. This requires you to submit a .zip, .rar, .tar, .tgz. etc… of the ENTIRE project. Individual source code files will not be accepted. Introduction This assignment is to develop a User Interface using classes from the javax.swing package. Tasks and Rubric Activity userInterface package BattleshipUI.java Add an import for 1. core.BattleshipClient 2. core.Ship Create an ActionListener for the Deploy Ships button that does the following: 1. Disables the UI components on the JPanel with ship selection options 2.
  • 2. Add a JPanel to the right of Player One’s button board with a JTextArea for displaying the game status to the user 3. Add a JPanel to the right of the game status with Player Two’s button board 4. Call the play() method in class BattleshipClient In the ActionListener for the Game Menu set the player mode based on what the user selected, the options are: Player versus Player Player versus Computer Computer versus Computer Example code: if(e.getActionCommand().equals("Player vs. Player")) { players[Constants.PLAYER_ONE].setPlayMode(Constants.HU MAN); players[Constants.PLAYER_TWO].setPlayMode(Constants.HU MAN); } Player.java Add a class member to store the player’s mode, human or computer; create getter/setter for the class member Create a method that will automatically layout the ships for when the player mode is set to computer using the Random class to randomly select the direction and location for the startRowClick and startColumnClick; make sure the auto layout uses null for the color PlayerOptionDialog.java Update the UI so that it reflects the saved data for each Player core package
  • 3. BattleshipClient.java This class controls the game being played Create a custom constructor that takes two parameters, an Array of class Player and class BattleshipUI Create a method play() to manage the play between Player One and Player Two; for this iteration only Human versus Computer has to function When a JButton has been selected/clicked: 1. if it is a hit a. change the background color to something other than the default gray(i.e. null) and the ship color (e.g.Color.BLACK) b. update the object instance so that the number of hits is increased or the hits left is decreased 2. if it is a miss a. change the background color to something other than the default gray (i.e. null), the ship color, or the color used for a hit When a ship has 0 (zero) hits left or has taken the max number of hits update the ship so that isSunk = true; notify the user when each of their ships has been sunk Whichever player sinks all five opponent’s ships first wins the
  • 4. game! functionality Compiles Source compiles with no errors Runs Source runs with no errors Comments Source includes comments Total Figures Figure 1 Initial display Figure 2 Deployed Ships Figure 3 Display Game Status and Player Two Panels Figure 4 Play Between Human and Computer
  • 5. Figure 5 End of Game Figure 6 Player Options Dialog Before Player Selection Figure 7 Player Options Dialog After Player Selection