import java.io.File;
import java.io.FileNotFoundException;
import java.util.*;
public class fileread{
public class MyClass
{
public int BS;
public double instate_cost,
outofstate_cost, retention;
public String name;
}
static Scanner console = new
Scanner(System.in);
public static void main(String[] args) throws
FileNotFoundException {
Scanner reader = new
Scanner(new File("filename.txt"));
MyClass []
array;
array = new MyClass[10];
for(int
i=0;i<10;i++)
{
array[i]= new
fileread(). new MyClass();
}
int i = 0;
double
temp,temp2;
//double instate_cost,
outofstate_cost, retention, high_instate_cost,
low_instate_cost;
//String
instate_cost_name , outofstate_cost_name, retention_name ,
name;
//int i = 0;
while(reader.hasNext())
{
array[i].BS
= reader.nextInt();
array[i].instate_cost = reader.nextDouble();
array[i].outofstate_cost = reader.nextDouble();
array[i].retention = reader.nextDouble();
array[i].name = reader.nextLine();
//System.out.println(array[i].name);
i++;
}
temp = -1.0;
temp2 = 2;
double low_instate =
1000000,high_instate =-1;
String ans=" ",ans2="
",ans3=" ",ans4=" ";
for(int
j=0;j<i;j++) // here i is basically the size of the
array of the MyClass
{
if(array[j].BS == 1)
{
if(array[j].retention > temp)
{
temp =
array[j].retention;
ans = array[j].name;
}
if(array[j].retention < temp2)
{
temp2 =
array[j].retention;
ans2 = array[j].name;
}
if(array[j].instate_cost >
high_instate)
{
high_instate =
array[j].instate_cost;
ans3 = array[j].name;
}
if(array[j].instate_cost < low_instate)
{
low_instate =
array[j].instate_cost;
ans4 = array[j].name;
}
}
}
System.out.print("Best Retention Rate is ");
System.out.print(" " +
temp * 100);
System.out.println(" " +
ans);
System.out.print("Worst
Retention Rate is ");
System.out.print(temp2 *
100);
System.out.println(" " +
ans2);
System.out.print("High
instate cost is ");
System.out.print(high_instate);
System.out.println(" " +
ans3);
System.out.print("Low
instate cost is ");
System.out.print(" " +
low_instate);
System.out.println(" " +
ans4);
}
}
Use Java programing Write a program to display information about schools in North Carolina that offer...
Please Use your keyboard (Don't use handwriting) *******Please re-write my answer I need new and unique answers, please. (Use your own words, don't copy and paste)***** Case Study 1: Should a Computer Grade Your Essays? Would you like your college essays graded by a computer? Well, you just might find that happening in your next course. In April 2013, EdX, a Harvard/MIT joint venture to develop massively open online courses (MOOCs), launched an essay-scoring program. Using artificial intelligence technology, essays...
Write down your analysis of this case on factors like the interests involved, context and power PACIFIC OIL COMPANY (A)* "Look, you asked for my advice, and I gave it to you," Frank Kelsey said. "If I were you, I wouldn't make any more concessions! I really don't think you ought to agree to their last demand! But you're the one who has to live with the contract, not me!" Static on the transatlantic telephone connection obscured Jean Fontaine's reply....
Write down your analysis of this case on factors like 1. the negotiation process, strategy and tactics PACIFIC OIL COMPANY (A)* "Look, you asked for my advice, and I gave it to you," Frank Kelsey said. "If I were you, I wouldn't make any more concessions! I really don't think you ought to agree to their last demand! But you're the one who has to live with the contract, not me!" Static on the transatlantic telephone connection obscured Jean Fontaine's...