Create a program that keeps track of specific information

Assignment Help JAVA Programming
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

Reference no: EM131914792

Questions Cloud

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.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Create a program that has an object type of contact

Create a program that has an object type of Contact. This contact will need to have the following attributes: Name, Birth Date, Phone Number, Address and Eye Color

  Initializing static fields

Why do static ?elds of a class have to be initialized when the class is loaded? Why can't we initialize static ?elds when the program starts? Give an example of what goes wrong if, instead of static ?elds being initialized too early, they are init..

  Create a sketch that draws this image using processing

Your task is to create a sketch that draws this image using Processing (the gray is the background): You are not allowed to use images, you must recreate the image using drawing commands such as rect(), triangle(), etc.

  Difference between string and stringbuilder

What is the difference between string and StringBuilder? What are the advantages and disadvantages of a StringBuilder

  Calculate the maximum data rate in mb/second

b)How much cylinder skew is needed for an Oceangate disk operating at 20,000 rpm(new series for the Christmas promotions) which has a seek time of 0.5 milliseconds? This disk has 800 sectors of 512 bytes each on each track.

  Design a single class that expresses the commonality

Design a single class that expresses the commonality of these concepts.

  Create a file with at least 10 sets

In this project you will use an input file "MathInput.csv" with instructions to perform math operation - Create a file with at least 10 sets;

  Redesign the grading program as an object-oriented design

redesign the grading program as an object-oriented design. We will start with a simple Student class. The student will have a name, an id (as a String) and a set of grades (as doubles)

  What is the purpose of the main method in a java application

Discuss the following questions with your classmates. What is the purpose of the main method in a Java application program? Can you write a Java program without it? Why? Why not?

  Write an application with three labeled text fields

Write an application with three labeled text fields, one each for the initial amount of a savings account, the annual interest rate, and the number of years

  Write java program to print strings given at command line

Write a program Average.java which just prints strings that it is given at command line, one per line. If nothing is given at command line, print "No arguments".

  Provide java code to create and initialize an array

Provide Java code to create and initialize an array of integers (Java primitive int), floats or any other Java primitive type of your choice. You pick the array name and length.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd