A program has been started for you: student_project.java. You must finish the code to read data...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A program has been started for you: student_project.java. You must finish the code to read data from a data file into the parallel arrays as follows: (the arrays are already defined in the code) Student Number (5 digits) Student name Advisor last name (Smith, Jones, or Atkins) Major (CIS, Math, or English) Cost of tuition GPA The data file that is to be used is "slist.txt" and is included with this assignment. In order for the program to find the correct data file, it MUST be copied to the main folder of your project. For example, if the project is called student project, there will be a folder under workspace called student project. This is where you MUST copy the file. When the program runs it will look for it in that folder. Method stubs have also been written for you. These are methods that are called at the proper time, but do not have code created yet. You are to finish these stubs as follows: 1. start program() read all data from the data file into parallel arrays. The valiable "count" will keep track of how many students have been read in 2. print all info() - Print all student information from the arrays 3. print specific major()- Print all students of a specific major (prompt for the major) 4. print advisor list()-Print all students who have a specific advisor (prompt for the advisor name) 5. print total tuition()-Print the total amount of tuition for each of the majors 6. print honor students()- Print the student name, GPA and major for all students with a GPA of 3.5 or higher (also print the count of honor students in each major) package student_project; import javax.swing.JOptionPane; import java.io.*; import java.util.*; import java.text.*; public class student_project { public static void main(String[] args). { int selection; int[] student_number=new int[100]; String[] student_name=new String[100]; String[] advisor_name=new String[100]; String[] major new String[100]; double[] tuition-new double[100]; int count=-1; start_program(); selection-menu(); while (selection !=6) { if(selection ==1) else print_all_info(); if (selection ==2) print_specific_major(); else if(selection ==3) print_advisor_list(); else if(selection ==4) print_total_tuition(); else if(selection=-5) print_honor_students(); selection-menu(); }//end of while loop }//end of main method //********** public static void start_program() { }//end start_program public static int menu() { int selection; String value; String output="RMU REPORT_MENU"+" "+ ="+" "+ "1. Print all student information" +" "+ "2. Print all students of a specific Major"+" "+ "3. Print all students of a specific Advisor"+" " + "4. Print total amount of tuition for all students"+" "+ "5. Report of your choice"+" " + "6. Exit"+" " + "Enter your slection > "; }//end menu value =JOptionPane.showInputDialog(null, output, "Input Data", JOptionPane.QUESTION_MESSAGE); selection Integer.parseInt(value); return selection; ****** public static void print_all_info() { } //* System.out.println(" " +"Executing print_all_info"); public static void print_specific_major() { } System.out.println(" " +"Executing print_specific_major"); //****** public static void print_advisor_list() { } System.out.println(" " +"Executing print_advisor_list"); public static void print_total_tuition() { System.out.println(" " +"Executing print_total_tuition"); } //***** public static void print_honor_students() { System.out.println(" " +"Executing print honor students"); 12345 #William Gallo #Smith #Computer Science #12000#3.50# 45671# Mary Hilling #Jones #Computer Science #1300.99 # 2.32# 98761#Peter Green #Atkins #Math # 7819.99 # 3.99# 88881#Gregory Allen #Jones#History # 12989.99#2.78# 77771 # Eric Richards #Jones #History # 10989#2.56# 28923#Gina Carbon #Atkins #Computer Science #6789.55 #3.77# 44444 #Julia Landon #Smith #Math#4500#2.66# 22222# Keri Fisher #Jones #Math #4999 #4.00# 92816# Andrew Johnson # Smith #History # 14989.99#3.49# 10002 # Philip Bosley #Jones #Computer Science #6189.77 #3.68# 98885#Thomas Brown #Atkins #History # 5987.99 #3.59# A program has been started for you: student_project.java. You must finish the code to read data from a data file into the parallel arrays as follows: (the arrays are already defined in the code) Student Number (5 digits) Student name Advisor last name (Smith, Jones, or Atkins) Major (CIS, Math, or English) Cost of tuition GPA The data file that is to be used is "slist.txt" and is included with this assignment. In order for the program to find the correct data file, it MUST be copied to the main folder of your project. For example, if the project is called student project, there will be a folder under workspace called student project. This is where you MUST copy the file. When the program runs it will look for it in that folder. Method stubs have also been written for you. These are methods that are called at the proper time, but do not have code created yet. You are to finish these stubs as follows: 1. start program() read all data from the data file into parallel arrays. The valiable "count" will keep track of how many students have been read in 2. print all info() - Print all student information from the arrays 3. print specific major()- Print all students of a specific major (prompt for the major) 4. print advisor list()-Print all students who have a specific advisor (prompt for the advisor name) 5. print total tuition()-Print the total amount of tuition for each of the majors 6. print honor students()- Print the student name, GPA and major for all students with a GPA of 3.5 or higher (also print the count of honor students in each major) package student_project; import javax.swing.JOptionPane; import java.io.*; import java.util.*; import java.text.*; public class student_project { public static void main(String[] args). { int selection; int[] student_number=new int[100]; String[] student_name=new String[100]; String[] advisor_name=new String[100]; String[] major new String[100]; double[] tuition-new double[100]; int count=-1; start_program(); selection-menu(); while (selection !=6) { if(selection ==1) else print_all_info(); if (selection ==2) print_specific_major(); else if(selection ==3) print_advisor_list(); else if(selection ==4) print_total_tuition(); else if(selection=-5) print_honor_students(); selection-menu(); }//end of while loop }//end of main method //********** public static void start_program() { }//end start_program public static int menu() { int selection; String value; String output="RMU REPORT_MENU"+" "+ ="+" "+ "1. Print all student information" +" "+ "2. Print all students of a specific Major"+" "+ "3. Print all students of a specific Advisor"+" " + "4. Print total amount of tuition for all students"+" "+ "5. Report of your choice"+" " + "6. Exit"+" " + "Enter your slection > "; }//end menu value =JOptionPane.showInputDialog(null, output, "Input Data", JOptionPane.QUESTION_MESSAGE); selection Integer.parseInt(value); return selection; ****** public static void print_all_info() { } //* System.out.println(" " +"Executing print_all_info"); public static void print_specific_major() { } System.out.println(" " +"Executing print_specific_major"); //****** public static void print_advisor_list() { } System.out.println(" " +"Executing print_advisor_list"); public static void print_total_tuition() { System.out.println(" " +"Executing print_total_tuition"); } //***** public static void print_honor_students() { System.out.println(" " +"Executing print honor students"); 12345 #William Gallo #Smith #Computer Science #12000#3.50# 45671# Mary Hilling #Jones #Computer Science #1300.99 # 2.32# 98761#Peter Green #Atkins #Math # 7819.99 # 3.99# 88881#Gregory Allen #Jones#History # 12989.99#2.78# 77771 # Eric Richards #Jones #History # 10989#2.56# 28923#Gina Carbon #Atkins #Computer Science #6789.55 #3.77# 44444 #Julia Landon #Smith #Math#4500#2.66# 22222# Keri Fisher #Jones #Math #4999 #4.00# 92816# Andrew Johnson # Smith #History # 14989.99#3.49# 10002 # Philip Bosley #Jones #Computer Science #6189.77 #3.68# 98885#Thomas Brown #Atkins #History # 5987.99 #3.59#
Expert Answer:
Related Book For
Modern Systems Analysis And Design
ISBN: 9780134204925
8th Edition
Authors: Joseph Valacich, Joey George
Posted Date:
Students also viewed these databases questions
-
(a) Use the following text to derive distributions for rat and chased. Use a five-word window, including open- and closed- class words, ignore case, punctuation and sentence boundaries and weight...
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
B sold shares of a qualified small business corporation (QSBC) in the current year realizing a capital gain of $640,000 and shares of a public company realizing a loss of $40,000. B has a net capital...
-
What types of global economic and legal-political issues might Starbucks face as it does business globally?
-
A hockey puck has an initial velocity of 50 m/s and a final velocity of 35 m/s. (a) If it travels 35 m during this time, what is the acceleration? (b) If the mass of the puck is 0.11 kg, what is the...
-
Identify the research scenario, including the general area of focus. Develop a hypothetical research scenario that would necessitate the use of the Action Research Approach and a Posttest With a...
-
On June 10, Rebecca Company purchased $7,600 of merchandise from Clinton Company, FOB shipping point, terms 2/10, n/30. Rebecca pays the freight costs of $400 on June 11. Damaged goods totaling $300...
-
The threshold frequency v0 describes the smallest light frequency capable of ejecting electrons from a metal. Determine the minimum energy E0 of a photon capable of ejecting electrons from a metal...
-
Techno, a unit of Outdoor Corporation, manufactures a line of electric, cordless, lawn mowers. Senior management of Outdoor Corporation has noticed that Techno has been producing more lawn mowers...
-
With relevant examples describe at least five (5) most important causes of externalities.
-
What are the intricate mechanisms underlying the symbiotic relationships between microorganisms and their host organisms, and how do these interactions shape ecological dynamics?
-
What are the intricate mechanisms underlying microbial adaptation to novel niches and habitats, including the role of genetic mutations, horizontal gene transfer, and epigenetic modifications, and...
-
Differentiate between limited-life and indefinite life intangible assets. What is the appropriate treatment (i.e., journal entry and calculation of impairment) for recognizing the impairment of an...
-
In what way have you sharpened your listening skills-based interviewing? What would you like to improve? What specific steps would you include in a plan to improve your mastery of listening skills in...
-
Let = {a,b,c,d, e} be a sample space. Define two functions X and X on 2 by the following table a bcde 1 1 X(w) 0 0 1 X(W) 1 1 1 0 0 (a) Determine whether the following functions are o(X,...
-
The Dow Jones Industrial Average reached a high of $ 7801.63 on December 29, 1997. Recall from Example 18.4 that it reached a high of $ 1003 on November 14, 1972. The Consumer Price Index for...
-
Use a tool for generating wireframe screen designs, such as Visio or Axure, to create a wireframe of some popular homepage.
-
An organization is in the process of upgrading microcomputer hardware and software for all employees. Hardware will be allocated to each employee in one of three packages. The first hardware package...
-
How can you decide among various off-the-shelf software options? What criteria should you use?
-
Is there any information that Shuang could get more easily by interview than by researching secondary sources? If so, what is this information and who would you recommend that she contact?
-
Do you have any additional tips and tricks you use to organize research results? If so, explain how they would be useful for this project.
-
How does the research process that Health Scape Advisors uses reflect the elements in the chapter?
Study smarter with the SolutionInn App