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
harina [27]
3 years ago
10

Declare a Scanner reference variable fileInput, and assign it a newly created Scanner object that is associated with a file name

d "data1". (Do not concern yourself with any possible exceptions here-- assume they are handled elsewhere.)
Computers and Technology
1 answer:
Naily [24]3 years ago
4 0

Answer:

Scanner fileInput = new Scanner(new File("data1"));

Explanation:

In JAVA Scanner class is used to get input from the user.

In order to use this class an instance of this class is created also called an object.

Here the fileInput is a reference variable which is also called instance variable used to access a Scanner object.

new keyword is used here to create an instance or object of Scanner class.

File is a class which works with files and directories. So new File("data1") is used to create an object of File and data1 is passed to it because in order to create an instance of the class, a string, which can be a name of file or an object is passed.

You might be interested in
Tim has an old server computer that his company uses as a backup. One of the hard drives has gone bad and needs to be replaced.
algol [13]

Answer: SCSI hard drive.

Explanation:

SCSI means Small Computer System Interface.

It is a fast bus with the capacity to connect a number of devices to a computer system simultaneously, those devices includes printer, scanners, tape drives, hard drives, CD-ROM devices. SCSI helps to connect devices and transfer data in between computer and ancillary devices.

SCSI was invented by the American National Standard Institutes (ANSI)

Common Components of SCSI includes;

• Target.

• Expander.

• Service delivery.

• Initiator.

• Sub system.

3 0
4 years ago
Using the 4 Cs, we consider where a company may decide to offer the product or service to customers. Whether online or in a phys
DanielleElmas [232]

Answer:

"Place" in the 4P's.

Explanation:

The 4C's marketing model was formulated in the year 1990 by Robert Lauterborn. The 4C's comprises of; Customer value, Cost, Convenience, and Communication. It is important to know that this marketing model is an improvement of the 4P's model.

Convenience implies that any product being marketed has to be made easily accessible to the customers. The location should also make it possible, that the product is easily seen by the customers.

Place was a concept in the 4P's model that sought to resolve the problem of where the product can be best distributed. The introduction of Convenience in the 4C's improved on it, and extended it to imply that there must be a high level of accessibility of the product.

3 0
3 years ago
Create a script that asks for the visitor's weight in pounds and his/her height in inches. The program should then calculate the
Nookie1986 [14]

Answer:

weightPound = float(input("Enter your weight in pounds "))

heightInches = float(input("Enter your height in inches "))

weightKg = weightPound*0.453592

heightMeter = heightInches*0.0254

BodyMassIndex = weightKg/(heightMeter*heightMeter)

print("")

print("Your Weight in kilograms is: ")

print(weightKg)

print("Your Height in meters is: ")

print(heightMeter)

print("Your Body Mass Index is: ")

print(BodyMassIndex)

Explanation:

  1. Above is a Python Script to accomplish the task
  2. See attached image for the program output.
  3. Observe that we used the formula weight/height*height to calculate the Body Mass Index
  4. Observe also the conversion from pounds to Kilogram and inches to meters

6 0
3 years ago
Suppose your cell phone carrier charges you a monthly fee of $30.00 for up to 300 minutes and $0.45 for each additional minute a
irakobra [83]

Answer:

30.00 + x * .45 where x is the number of minutes

in code it would be:

import java.util.Scanner;

public class monthlyFee{

   final double MONTHLY_FEE = 30.00;

   final double ADDITIONAL_MINUTE_FEE = 0.45;

   double additionalMinute = 0;

   public monthlyFee(double minutes){

   additionalMinute = minutes;

   }

   public double calculate(){

       if(additionalMinute > 0){

       double TotalFee = MONTHLY_FEE + additionalMinute * ADDITIONAL_MINUTE_FEE;

       return TotalFee;

       }

       else

       return MONTHLY_FEE;

   }

   public static void main(String...args){

   Scanner input = new Scanner(System.in);

   System.out.println("Enter minutes: ");

   double minutes = input.nextDouble();

   monthlyFee obj1 = new monthlyFee(minutes);

   System.out.printf("$" + "%.2f", obj1.calculate());

   }

}

Explanation:

so whatever x is just multiple it by 0.45 to get the total for just the fee.

6 0
3 years ago
Which of the following is another word for paradigm?
EleoNora [17]
The best answer choice is model, it is a synonym for the word paradigm

3 0
3 years ago
Other questions:
  • A technology _____ begins with the birth of a new technology and ends when that technology reaches its limits and dies as it is
    13·1 answer
  • Categories of general purpose application software and examples each​
    13·1 answer
  • What is an example of a transition effectl
    7·1 answer
  • Edhesive coding practice 3.4​
    12·1 answer
  • If you want to change the smart quote settings, what steps should you follow to find them?
    5·1 answer
  • Listed items that are not in any particular order should be identified with
    8·1 answer
  • ____________ are designed to delete temporary files (such as deleted files still in the Recycle Bin, temporary Internet files, t
    10·2 answers
  • Types in java are divided into two categories. the primitive types are boolean, byte, char, short, int, long, float and double.
    5·1 answer
  • List seven media features that can be used in media queries.
    10·1 answer
  • Which statement best describes one reason why assembly language is easier
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!