Question

Anyone helps me in a Java Languageif it it is possible thanks. Write a class called...

Anyone helps me in a Java Languageif it it is possible thanks. Write a class called Player that holds the following information: Team Name (e.g., Ravens) . Player Name (e.g., Flacco) . Position's Name (e.g. Wide reciver) . Playing hours per week (e.g. 30 hours per week). Payment Rate (e.g., 46 per hour) . Number of Players in the Team (e.g. 80 players) . This information represents the class member variables. Declare all variables of Payer class as private except the team name and the number of players in the team. Declare the name of the Team as static variable with public visibility; remember, all Players objects should be hired from the same Team. Declare the number of players in the team as static variable with default visibility and initialize it with zero. In each private variable, create a getter and setter functions to read and modify that variable. Create two version of the class constructor (i.e. Two overloaded constructors). For the first version, initialize the class’s variables with default values that are chosen by you. For the second version, initialize the class’s variables with the values of formal parameters. You do not forget and remember overloaded methods have the same name but different signatures. Create a method to compute the Player monthly salary based on his payment rate and playing hours. The method should return a float value that represents the monthly salary. Create a static method that returns the number of instances that have been created (i.e. return number of players in the team). Next, Create a driver test class called PlayerTest that includes the main method. Inside the main method, do the following steps: Create several objects of Player class using the class constructors. You might create some objects using the default constructor and some using different parameters inputs given by the user. After you finished creating the objects, use the static method to get the number of players or the number of objects that are created and print it. For each player in the team, print the player information, in which includes the team name, player name, job name, playing hours, payment rate, and monthly salary. You should print the information of objects one by one; or you my use a loop statement to loop through all objects and print their information (please make sure use a loop statement on the PlayerTest.)

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Anyone helps me in a Java Languageif it it is possible thanks. Write a class called...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Write a JAVA program that declares a class Pet  With three variables Name, Age, weight .The class...

    Write a JAVA program that declares a class Pet  With three variables Name, Age, weight .The class has  different constructors the first without parameters ,the  second with three parameters and the third with two parameters. In the main method  create three objects using thee different constructors to initialize the Variables.  then print out all the information a bout all objects .

  • Write a class that encapsulates the concept of a baseball player with the important attributes (name,...

    Write a class that encapsulates the concept of a baseball player with the important attributes (name, position, hits, at bats, batting average). The class will have the following methods: Two constructors (a default and a constructor with all parameters) Accessors, mutators, toString, and equals methods The batting average property will not have a public setter, it will be updated any time the hits and/or at bats is set. The getter will round to three digits (.315 or .276, etc.) All...

  • In c++ Write a program that contains a class called Player. This class should contain two...

    In c++ Write a program that contains a class called Player. This class should contain two member variables: name, score. Here are the specifications: You should write get/set methods for all member variables. You should write a default constructor initializes the member variables to appropriate default values. Create an instance of Player in main. You should set the values on the instance and then print them out on the console. In Main Declare a variable that can hold a dynamcially...

  • Create a Java application, that support the following: Create an Employee class, which holds following information:...

    Create a Java application, that support the following: Create an Employee class, which holds following information: Employee First Name Employee Last Name Employee Phone Number Employee Address Employee id Employee Title Employee salary Create an application that uses the Employee class Constructors –Getters and setters A minimum of 3 constructors including default constructor equals() method Helper methods toString() method Create an array of 5 Employee objects Use a Scanner to read in 5 employee information Change 2 employees information (3-items...

  • can you solve it in java please Create the following: 1. Class Invoice ( the node...

    can you solve it in java please Create the following: 1. Class Invoice ( the node ) that includes three instance variables:     int No; // the Invoice No             String CustName; // the Customer name             int Amount; // the Invoice Amount Invoice next; // points to the next Invoice Default and overloaded constructors 2. Class Shop that includes three instance variables: Invoice head; Invoice Tail; Your class should have the following: • A method that initializes the instance variables....

  • Implement an abstract class named Person and two subclasses named Student and Staff in Java. A person has a name, address, phone number and e-mail address. A student has a credit hour status (freshman...

    Implement an abstract class named Person and two subclasses named Student and Staff in Java. A person has a name, address, phone number and e-mail address. A student has a credit hour status (freshman, sophomore, junior, or senior). Define the possible status values using an enum. Staff has an office, salaray, and date-hired. Implement the above classes in Java. Provide Constructors for classes to initialize private variables. Getters and setters should only be provided if needed. Override the toString() method...

  • Hello. I need help writing the following Java Program. Thank you Develop a class encapsulating the...

    Hello. I need help writing the following Java Program. Thank you Develop a class encapsulating the concept of a college course, assuming that a course has following attributers: code (for instance COSC1337), a description, and a number of credits (for instance 3). Include a constructor, the accessors, mutators and methods ‘toString’, ‘equals’, and ‘finalize’. Write a client class to test the behavior of the class and its methods. The outline of the class is given as follows: public class Course...

  • Write a class called Player that has four data members: a string for the player's name,...

    Write a class called Player that has four data members: a string for the player's name, and an int for each of these stats: points, rebounds and assists. The class should have a default constructor that initializes the name to the empty string ("") and initializes each of the stats to -1. It should also have a constructor that takes four parameters and uses them to initialize the data members. It should have get methods for each data member. It...

  • In Java* Please implement a class called "MyPet". It is designed as shown in the following...

    In Java* Please implement a class called "MyPet". It is designed as shown in the following class diagram. Four private instance variables: name (of the type String), color (of the type String), gender (of the type char) and weight(of the type double). Three overloaded constructors: a default constructor with no argument a constructor which takes a string argument for name, and a constructor with take two strings, a char and a double for name, color, gender and weight respectively. public...

  • Write a program

    1. Write a program which have a class named as “Student”, while the data members of the class are,a. char name[10],b. int age;c. string color;d. string gender;e. double cgpa;and the member function “print()”,  is just to display these information.1. You need to create 3 objects of the “Student” class.2. Initialize one object by the default constructor having some static values.3. Initialize the second object by the parameterized constructor, while you need to pass values for initialization.4. Initialize the third object...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT