Question: Need Help with proper aggregation and Composition of the classes. Java language 3. Programming Task One of the most popular multiplayer video games in 2020

 Need Help with proper aggregation and Composition of the classes. Java

language 3. Programming Task One of the most popular multiplayer video games

Need Help with proper aggregation and Composition of the classes.

Java language

3. Programming Task One of the most popular multiplayer video games in 2020 was "among us". In this lab you are going to implement (a small part of) the backbone of this game, which is the objects and their relationships. Four to ten people can play this game, and each takes a role. A player can either be an imposter or a crewmate. The goal of the crewmates is to complete a set of tasks, while they identify the imposters and eliminate them. The goal of the imposters is to covertly kill the crewmate before they complete their tasks. Through a voting system, a player may be voted as an imposter and fired from the game. Crewmates will be the winner either if they complete all the tasks or eliminate all the imposters. Imposters will be the winner if the number of the crewmates in the game is the same as the imposters. The game has a science fiction theme with four areas in which players play the game. These areas are called "The Skeld", "MIRA HQ", "Polus" and "Airship". For this lab, you are going to implement the constructors, setter and getter methods for the classes that are shown in the UML below. It is important that the relationships (i.e. aggregations and composition) are implemented correctly. Please note that there are some methods in this UML that we are not asking you to implement. They are only there to make the objects more understandable and the relationship clearer. Player name: String + role: Role Role + role: char - setRole(Role): void -getRole(): Role + SetName(String): void - getName(): String + setRole(chary void -getRole(): char +foWired void - download(): String + maintain(String) void - Kill Player):Player Game Map - theSkeld: String + miraHq: String + polus: String airShip String - player. Player - map: Map + setPlayer(Player/Ix void + getPlayer[] Player setiap(Mapll): void getMapo: Mapo Task 1: implementing Role class For this task, you are required to implement the default, overloaded and copy constructor along with the setter and getter method. The full documentation of class and the methods can be found in the starter code. Task 2: implementing Map class For this class you only need to implement three constructors; the default, overloaded and copy constructor. Task 3: implementing Player class Three types of the constructors (default, overloaded and copy) and all the setter and getter methods is what we ask you to implement for this task. Task 4: implementing Game class Three types of the constructors (default, overloaded and copy) and all the setter and getter methods is what we ask you to implement for this task. Please note that the instance variables in this class are all private, as the UML shows

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!