1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Makovka662 [10]
3 years ago
11

Write a program to read data from a file named problem 2. ext. This file has three exams data (floating point data) in three col

umns for the students in a class. Find the average and the highest score in the class for the Second exam which is located in the Second column of the file. Assume that the file has neither initial number of total lines of data values nor any sentinel signals. That is your program need to show that you have no idea how many data lines are there) 77 90 86 66.5 88 80.5 95 75 80 80 79 89 70.5 81 Note: If you don't have the software access then you don't have to worry about saving the data file. Just write your code assuming the text file is saved in the right location.
Computers and Technology
1 answer:
Travka [436]3 years ago
6 0

Answer:

import java.io.File;  // Import the File class

import java.io.FileNotFoundException;  // Import this class to handle errors

import java.util.Scanner; // Import the Scanner class to read text files

public class ReadFile {

 public static void main(String[] args) {

   try {

     File myObj = new File("filename.txt");

     Scanner myReader = new Scanner(myObj);

     while (myReader.hasNextLine()) {

       String data = myReader.nextLine();

       System.out.println(data);

     }

     myReader.close();

   } catch (FileNotFoundException e) {

     System.out.println("An error occurred.");

     e.printStackTrace();

   }

 }

}

Explanation:

this will read the file and print it out, to do the rest have it take the data and use some "java math" and then print the answers to either console or a file of your choice.

You might be interested in
You and your friend play a video game where a superbird has to find and eat radiation leaks at nuclear power plants before the p
koban [17]

Answer:

Bird with superpowers

Explanation:

It is the main idea

7 0
3 years ago
Read 2 more answers
domain controllers store local user accounts within a sam database and domain user accounts within active directory. true or fal
Natalka [10]

Answer:

True

Explanation:

The domain controller is a server that responds within windows server domains to request for security authentication. It enforces security for windows and they are useful for storing the account information of users, that is local users within a Security Account Manager. Therefore the answer to this question is true.

Thank you!

5 0
2 years ago
By definition, a computer
lapo4ka [179]

Answer has a screen

Explanation:

a computer has a screen

5 0
2 years ago
In a category of games known as _________, millions of players connect to various servers to team up with other players in very
aivan3 [116]

In a category of games known as MMORPGs, millions of players connect to various servers to team up with other players in very large virtual worlds.

<h3>What do MMORPGs mean?</h3>

The term  MMORPG connote  massively multiplayer online role-playing games.

This is known to be a type of video game that tends to make use of different elements of role-playing games (RPGs) along with those of the gameplay of multiplayer online gaming worlds.

Therefore, In a category of games known as MMORPGs, millions of players connect to various servers to team up with other players in very large virtual worlds.

Learn more about virtual worlds from

brainly.com/question/13873769

#SPJ1

3 0
1 year ago
I need help with this pokemon quiz question:
eduard

Answer:

a lot

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • A field whose data type is ____ can store text that can be used as a hyperlink address
    5·1 answer
  • Explain why blocking ping (ICMP echo request) packets at an organization's edge router is not an effective defense against ping
    11·1 answer
  • In a Comparative Government course, the first unit focuses on the US Congress and the
    8·1 answer
  • What type of device does a computer turn to first when attempting to make contact with a host with a known IP address on another
    9·2 answers
  • Jack has a fear of getting up in front of a group of people and giving a presentation. When he gave his last presentation, he ta
    5·2 answers
  • Given two strings s and t of equal length, the Hamming distance between s and t, denoted dH(s,t), is the number of corresponding
    6·1 answer
  • Create a vector of structures experiments that stores information on subjects used in an experiment. Each struct has four fields
    12·1 answer
  • An office uses an application to assign work to its staff members. The application uses a binary sequence to represent each of 1
    9·1 answer
  • If anyone knows how to code on python:
    8·1 answer
  • According to Okun's law, if the unemployment rate goes from 7% to 4%, what
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!