Concepts tested by this programStatic variable and methodsMultiple classes (Enumeration/Data Element/Data Structure/Data Manager/JavaFX driver)Class relationationships Dependancy and AggregationEnumerated TypesArrayListsJUnit TestsGUI:Displaying ImagesTextAreasPanes and Component LayoutBorders (bordered radio group) use .setStyleUsing the .setStyle for font size and color
Deliverables:Java files The src folder with your driver (javafx application), enumerated class, data element, data manager and Junit Test (.java) filesJavadoc files The doc folder with your javadoc for student generated filesUML Class Diagram (an image, not the proprietary format, must be a .jpg)
Deliverable format: The above deliverables will be packaged as follows. Two compressed files in the following formats:LastNameFirstName_AssignmentX_Complete.zip [a compressed file containing the following]UML.jpgAssignment 5 Checklist (filled in with YES or NO or ?)doc [a directory] please include the entire doc folder with the javadoc for studentgenerated filesfile1.html (example)file2.html (example)src [a directory] contains your driver (javafx application), enumerated class, dataelement, data manager and Junit Test (.java) filesFile1.java (example)File2.java (example)File_Test.java (example)LastNameFirstName_AssignmentX_Moss.zip [a compressed file containing only the following]contains .java file which includes the driver (javafx application), enumeratedclass, data element, data manager and Junit Test (.java) files NO FOLDERS!!File1.java (example)File2.java (example)
BASKETBALL TEAM ROSTER GENERATOR
At the start of a basketball game, each coach writes out their players names on the scoresheet and gives it to the score-keeper. When a player enters the game, the scorekeeper must keep track of who is in the game. Your task is to write a GUI-driven program to enter the starting roster and positions of a basketball team. Each team will include 2 forwards, 1 center and 2 guards.Notes:1. Your program ONLY records the starting team, not the entire team.2. Your program will also note each players position (although actual scorekeepers do not do this).3. Your program will not be required to keep track of the teams or players when the program goes on to the next team (the program would need to be extended to be useful to actual scorekeepers).4. Your program will be GUI-driven, not command-line.5. Your program will display an image of a basketball on the GUI.OperationThe user will start the application by selecting New Team. The user will then type in the Teams name in the Team Name textbox.The user will enter the first and last name of the team member and then indicate which position the member will play. The user then selects the Add Player button.If the position selected is already filled (1 center, or 2 forwards or guards), an error message is displayed.When the user selects the Print Team button, the names of the team will be displayed with their position in the Team Roster textArea.When the user selects the New Team button, the team name field becomes available for user to type in team name.When the user closes the frame or presses the Exit button, the application exits.
SpecificationsEnumerated Class PositionCreate an enumerated type called Position. The valid values will be GUARD, CENTER, FORWARD.Data Element Player classCreate a Player class. It will contain instance variables of type String for the first name and last name. It will contain an instance variable of type Position for the position. Provide a constructor and a toString method. Add any additional methods as required.Data Manager Team classCreate a Team class. It will contain an ArrayList of Player Objects. It will have a static variable that keeps track of the number of players that have been added to the team and a static method that returns the value of this variable. Provide a constructor and a method to addPlayer, a method to printTeam and a toString method. The addPlayer method will check that there is only 1 center, 2 forwards and 2 guards at a time and will check that there are no more than 5 members of the team. The addPlayer method will return a String indicating what the error is (i.e. There is already a center on this team) or a null if the player was added. Make sure your class names and method names and parameters match the Javadoc that I provided for this class, or the JUnit test will not run correctly.GUI driver JavaFXProvide events/event handling for the following buttons: addPlayer extract first and last name from textboxes, determine which position, call the addPlayer method from the Team class printTeam call the printTeam method of the Team class and display results in the text area clear clear the first and last name and any error messages, do not clear the team name, dont change the position newTeam make the teamName textbox editable. Clear the team name, first name and last name fields and the text area for the team roster. When the user types in the team name and hits enter, the teamName textbox becomes uneditable again and if the addPlayer, clear and printTeam buttons are disabled, enable them at this time (see event handling for teamName field). exit exit the applicationProvide event handling for the following textboxes: teamName Extract the team name entered by user, create a new Team object with this team name, and make the teamName textbox uneditable. If the addPlayer, clear and printTeam buttons are disabled, enable them at this time. (Be aware that the user must press Enter after typing in the team name, for the event to be triggered)Use Panes and Component Layout to organize your GUI (VBox and HBox, etc)The teamName textbox is initially set to uneditable (.setEditable(false))Use a border around the radio buttons box for Position (use .setStyle)Display the basketball image at top of the panel.Use an instance variable of type Team. Use the addPlayer and printTeam methods of the Team class.Display an error message at the bottom of the screen when there is an error.If the New Team button is selected, make the teamName textbox editable, after the user types in the team name, make the teamName textbox uneditable again.
DocumentationJavadoc:A set of html documents generated using Javadoc tags.Comments in source code:In addition to the documentation comments which are used by javadoc, include in-line comments as needed to further explain your codeTestingYour code should compile and run without errors.You should test your GUI by manually selecting various sets of buttons and text entries.JUnit Tests:Check your program by running the JUnit tests found in BasketballTeamTest.javaAdd STUDENT test(s) for the Team class in BasketballTeamTest.java.Create a JUnit test for your Player class.Include your updated version of BasketballTeamTest.java in your submission.Program Grade Sheet Assignment #5
Name ________________________________ Submittal Date/Time ________________________
DOCUMENTATION Total 25 pointsCheckList for Assignment 5 is included and completed 1 pt _____Class Documentation Javadoc for all student generated classes 10 pt ____Class description, @authorMethod description, @param, @returnJUnit Test Classes 5 pt _____Implement the Student test methods of BasketballTeamTestCreate a test for the Player classUML Diagram 4 pt _____Lessons Learned 5 pt _____In 3+ paragraphs, highlight your lessons learned and learning experience from working on this project. How did you do? What have you learned? What did you struggle with? How will you approach your next project differently?
PROGRAMMING Total 75 pointsInternal class Javadoc documentation (within source code) 5 pts _____Description of what each class doesAuthors Name, @authorMethods commented properly using Javadoc documentsDescription@param, @returnCompiles and Runs without runtime errors or warnings 10 pts _____
AccuracyPublic tests JUnit test given to you 6 pts _____Your JUnit Tests added to BasketballTeamTest and PlayerTest 4 pts _____Private tests other tests run by the instructor 10 pts _____
Program DetailsData Element Player class 7 pts _____1. Contains instance variable of type Position2. Contains constructor and toString methods3. Contains getters and setters for instance variablesData Manager Team Class (use javadoc provided) 12 pts _____1. Contains at least one static variable and static method2. Contains methods to addPlayer, printTeam, etc3. Contains an ArrayList of Player object referencesEnumerated Type Position 5 pts _____1. Enumerated type Position is created with enumerated valuesGUI JavaFX application 10 pts _____1. Provide events/event handling for the following buttons:addPlayer, printTeam, clear, newTeam, exit2. Provide event handling for the following textboxes: teamName3. Use Panes and Component Layout to organize your GUI (VBox and HBox, etc)4. The teamName textbox is initially set to uneditable (.setEditable(false))5. Use a border around the radio buttons box for Position (use .setStyle)6. Display the basketball image at top of the panel.7. Use an instance variable of type Team. Use the addPlayer and printTeammethods of the Team class.8. Display an error message at the bottom of the screen when there is an error.9. If the New Team button is selected, make the teamName textbox editable,after the user types in the team name, make the teamName textbox uneditable again.10. Program user interface 3 pt _____Clear to user how data is to be enteredOutput is easy to understand11. Data Validations/Output formats 3 pt ___Program should only accept valid inputsinvalid data must be detected, warn user and then ignored.Program should not crash due to bad inputs.Total 100 pts _____
Player firstName : String lastName : String playerPosition: Position+ Player (first, last : String, pos: Position)+ Player (info : Customer)+ getFirstName () : String+ getLastName () : String+ getPosition() : String+ toString () : String
Team teamName : String numPlayers : int numCenters : int numForwards: int numGuards: int currentPlayer: ArrayList<Player+ Team (tm : String)+ addPlayer(fName, lName, pos : String)+ printTeam () : String+ toString () : String
Diamond pointing up<enumerationPositionGUARDFORWARDCENTER
+ Position (pos : String)+ getName() : String+ toString () : String
Reviews
There are no reviews yet.