Reference no: EM131914792
Create a program that keeps track of specific information for Students.
The information stored should be the following: First Name, Last
Name, Major, GPA, UIN, NetID, Age, Gender.
For this simple program we will only need to store 10 students in an arrayList.
Your students should be stored in an object called Student.
You should be able to add and remove Students in the arrayList.
TennisArrayListjava
main()
Create an ArrayList of type TennisPlayer. Then call two methods, fillTennisArrayList() and printTennisPlayers(), with the ArrayList as the argument.
fillTennisArrayList()
This method defines one parameter, an ArrayList of type TennisPlayer.
The input file includes information about a number of tennis players. For each player, their name, country, rank, age, wins and losses are provided, each on its own line. The file provided includes information for seven players, but the file may contain information for any number of players. However, the format of six lines for each player will be the same and the information will be in the same order.
Iterate through the file using a while loop. For each tennis player, obtain all the information for that player, create a TennisPlayer object using the information from the file, and add the TennisPlayer object to the ArrayList.
When method completes using the provided file, the ArrayList will contain seven TennisPlayer objects.
printTennisPlayers()
This method defines one parameter, an ArrayList of type TennisPlayer. Iterate through the ArrayList and print the tennis player information using the displayPlayer() method in the TennisPlayer class.
Notes:
- Hard code the name of the file, tennisplayers.txt, into your program.
- You may encounter a Scanner.nextLine issue within this program. There are two remedies. The first is to use nextLine to get each line and then convert the numers to ints using Integer.parseInt(). Another way is below, assuming iFile is your Scanner object.
if (iFile.hasNextLine () )
iFile.nextLine 0 ;
- Make sure the method printTennisPlayers() is printing the contents of the ArrayList passed to the method
Has motivation changed since herzberg research
: Has motivation changed since Herzberg's research? If so, how? Has what motivates you changed over time?
|
Creating an unreasonable risk of violent crime
: The sons of a murder victim brought a wrongful death/negligence action against a magazine, Soldier of Fortune, alleging that it had published.
|
Calculate the amount of joint manufacturing costs
: ACCT520 - Assignment - Calculate the amount of joint manufacturing costs allocated to each product using the number of produced as the allocation base
|
What healthcare issues do you foresee impacting your region
: What healthcare issues do you foresee impacting your region in Connecticut, the U.S., and the world over the next 50 years? Why?
|
Create a program that keeps track of specific information
: Create a program that keeps track of specific information for Students - Make sure the method printTennisPlayers() is printing the contents of the ArrayList
|
How the apollo mission were unique for traveling to the moon
: How the Apollo missions were unique for traveling to the Moon and back. How the planned Mars missions are unique for traveling to the Red Planet.
|
What is the objective function
: Your goal is to maximize 30x + 10y subject to 3x plus y cannot exceed 300, x plus y cannot exceed 200, x cannot exceed 100, and y must be at least 50.
|
Discuss the freedom of speech
: Paul Palmer submitted three shirts to his Waxahachie, Texas, school for approval under the school's dress code. Two of the shirts said "John Edwards.
|
New corporate policy
: You have been asked to give a business presentation to a small group of cross functional peers to inform them of a new corporate policy.
|