
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Assignment; Class: INTRO TO COMPUTER PROGRAMMING; Subject: Computer Science; University: University of Pittsburgh; Term: Fall 2005;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!
Program 3 Java Due: Nov 1, 2005 Write a Java program that has three parallel arrays defined in the following way: name: age: qpa: Ozzy 15 1. Madonna 14 3. Pele 17 3. Maradonna 14 2. Posh 16 2. Leonardo 18 3. Parallel arrays are set up so that each array, for a given index value, contains information that is related. For example, the person in array name[index = 2] has a grade average in array qpa[index=2], and the age of the person is age[index=2] years old. So “Pele” is 17 years old and has a qpa equal to 3.41. Create these arrays with these initial values stored in them. Write a program that has three public static functions defined in the following table: Method name Return type Input arguments Actions top_of_class String name[], qpa[] Exams entries in array qpa and returns the name of the person with the highest qpa. avg double qpa Returns the average qpa of all people. how_old int name[], target, age[] Returns the age of the person whose name is stored in variable target [String] Your main method will have a loop that will ask the user what option she wants to take and display 4 choices: