Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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

Java, Programming

  • Category:- Java
  • Reference No.:- M92753456
  • Price:- $10

Priced at Now at $10, Verified Solution

Have any Question?


Related Questions in Java

Assignment - method in our madnessthe emphasis for this

Assignment - "Method in our Madness" The emphasis for this assignment is methods with parameters. In preparation for this assignment, create a folder called Assign_3 for the DrJava projects for the assignment. A Cityscap ...

Can someone kindly help me to consider whether java

Can someone kindly help me to consider whether Java provides the facility of operator overloading? If it does, may you kindly describe how overloading operators can be accomplished? If not, may you kindly describe why yo ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

In ruby the hash class inherits from enumerable suggesting

In Ruby, the Hash class inherits from Enumerable, suggesting to a programmer that Hashes are collections. In Java, however, the Map classes are not part of the JCF (Java Collections Framework). For each language, provide ...

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

Solving 2nd degree equationsbull write the following java

Solving 2nd degree equations • Write the following Java methods • boolean real-sols(double a, double b, double c): it returns true if the 2nd degree equation ax2 + bx + c has real solutions • double solution1(double a, d ...

Applied software engineering assignment 1 -learning

Applied Software Engineering Assignment 1 - Learning outcomes - 1. Understand the notion of software engineering and why it is important. 2. Analyse the risk factors associated with phases of the software development lif ...

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Can someone help me please with those question1what is the

Can someone help me please with those question 1:what is the best data type for student id datatime,currency,number,decimal 2:which relationshipis preferable? one to one,one to many,many to many 3:if you add table A's pr ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As