his homework is included in your final grade and is scored out of 8 points . Instructions: Complete 12.30 and the following problem Students.java The file students.txt has the following format on...

1 answer below »


his homework isincluded in your final gradeand is scored out of8 points.



Instructions:


Complete 12.30 and the following problem


Students.java


The file students.txt has the following format on each line



fname(string) lname(string) credits(int) GPA(float) with a single space between each field.


For example


Mitchell Beck 11 2.88
Thelma Colon 43 2.25
Erma Mullins 68 1.98
Pedro Mack 17 1.95


A freshman has 0-29 credits, a sophamore has 30-59, a junior has 60-89 and a senior has 90+ credits. Write a program to open the file and read all the contents. Report back to the user the number of freshmen, sophomores, juniors and seniors. Output the first and last names of the person with the highest GPA for each of those categories.




Grading criteria


12.30 Letter Occurences


0.5 Prompt and read file name


1.0 Read file and process character data


0.5 Report A-Z frequencies


1.0 Form


1.0 Documentation



Students.java


1.0 Read data from file


0.5 Count and report number for each year


0.5 Report highest GPA for each year


1.0 Form


1.0 Documentation





Files:



students.txt(.txt, 2K)


Sample data file


Below is the data file


Mitchell Beck 11 2.88


Thelma Colon 43 2.25


Erma Mullins 68 1.98


Pedro Mack 17 1.95


Stella Diaz 122 2.15


Mona Conner 103 1.38


Gilbert Kim 16 1.36


Renee Miles 11 1.29


Cesar Warner 122 0.99


Krystal Pittman 33 0.74


Lonnie Evans 65 2.67


Lorene Murray 97 1.78


Gabriel Burgess 24 3.59


Timothy Pratt 45 3.84


Joseph Cummings 21 1.29


Lori Barrett 114 1.80


Salvador Simmons 103 3.85


Isabel Russell 126 1.06


Lawrence Swanson 9 0.67


Tracy Jennings 68 0.73


Lowell Wagner 65 0.73


Jackie Stanley 16 2.80


Joann Summers 20 2.66


Sally Bell 120 3.64


Robyn Ruiz 80 3.92


Misty Blake 128 0.44


Austin Morrison 45 3.95


Phillip Aguilar 18 0.08


Ana Burke 84 2.57


Rosa Ballard 23 3.60


Rachael Owens 98 0.18


Elmer Watson 111 2.56


Erica Horton 39 3.52


Rose Fernandez 89 1.64


Gregg Hubbard 115 3.79


Mathew Reyes 39 3.51


Winston Underwood 15 1.98


Scott Austin 123 1.76


Nettie Bryant 60 3.57


Brent Bass 46 0.68


Elias Hogan 5 0.13


Alyssa Collins 94 3.50


Kristen Ellis 17 2.29


Gerardo Williams 77 3.25


Van Reynolds 103 3.93


Tommie Doyle 49 3.73


Stacy Soto 42 1.31


Nancy Parker 122 1.69


Colleen Grant 80 1.44


Melvin Simpson 15 2.06


Janet Bowers 77 1.80


Frederick Lucas 53 0.06


Kristopher Garcia 94 0.93


Kayla Sherman 60 0.80


Matthew Mclaughlin 25 1.34


Kerry Howell 128 0.52


Monica Franklin 45 3.96


Hazel Dawson 59 3.12


Eleanor French 10 3.61


Diana Carlson 129 3.55


John Silva 92 1.69


Cody Taylor 121 0.58


Paula Wheeler 47 0.40


Eunice Higgins 17 1.04


Evan Reed 72 2.94


Robin Fuller 42 3.93


Yvette Norton 0 2.53


Lee Rice 83 2.58


Casey Blair 83 2.11


Alberto Willis 107 0.87


Dixie Hicks 112 1.14


Alfred Dennis 35 1.58


Debra Chavez 40 2.82


Joy Robertson 129 3.68


Kerry Bridges 83 3.92


Spencer Baldwin 14 2.54


Dana Curry 81 0.97


Josephine Wood 4 3.37


Whitney Andrews 88 1.19


Rudolph Hoffman 31 3.03


Edith Massey 118 0.07


Jamie Hawkins 93 0.55


Ernestine Daniel 101 0.02


Bill Cross 100 0.68


Norma Hayes 35 2.82


Jermaine Thornton 26 2.74


Sherry Wilkins 32 2.36


Floyd Gill 109 1.79


Jacob Medina 55 0.47


Sue Kelly 36 0.09


Cecilia Mckenzie 11 1.24


Boyd Benson 127 2.17


Anna Lambert 46 1.07


Alton Holt 42 0.49


Ricardo Kelley 96 2.18


Daisy Guerrero 108 0.67


Melissa Gray 88 0.96


Alex Wilkerson 68 2.82


Karl Moran 125 2.65


Curtis Hampton 127 3.24



Exercise 12.30



Answered Same DaySep 21, 2021

Answer To: his homework is included in your final grade and is scored out of 8 points . Instructions: Complete...

Aditya answered on Sep 22 2021
146 Votes
Final/CountLetter
package countletter;
import java.io.*;
import java.util.Map;
import java.util.S
canner;
import java.util.TreeMap;
import java.*;
public class CountLetter{
public static void main(String agrs[]) throws IOException
{
char[] alphabets = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
int[] counts ={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int ch = 0;
File file = new File("d:\\output.txt");
FileReader fr = new FileReader(file);
BufferedReader br = new BufferedReader(fr);
while ((ch = br.read()) != -1)
{
char character = Character.toUpperCase((char)ch);
for(int i = 0;i<26;i++)
{
if(character==alphabets[i])
{
counts[i] = counts[i]+1;
break;
}
}
}
br.close();
for(int j =0;j<26;j++){
System.out.println("Number of "+alphabets[j]+"s "+counts[j]);
}
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here