Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

       

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#

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Systems Analysis And Design

Authors: Joseph Valacich, Joey George

8th Edition

0134204921, 978-0134204925

More Books

Students also viewed these Databases questions