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
Liono4ka [1.6K]
3 years ago
12

What is the difference between "What I ought to do?" and "What kind of person should I be"?

Computers and Technology
1 answer:
Luba_88 [7]3 years ago
8 0

Answer:

It is the Virtue ethics. When we say what I ought to do then we mean what is the correct thing to do at that time. However, when we say what kind of person should I be, it means what is correct for our own sake. The decision we take in this case can be good as well as bad, and it is according to our own sake. However, when we say ought to, we mean deeper. and that is what is correct at that instant.

Explanation:

Please check the answer section.

You might be interested in
How to make changes to a file on the USB drive
Troyanec [42]
Um put ur usb drive in to your computer and change your files like that :)
8 0
3 years ago
Read 2 more answers
Write a method named countInRange that accepts three parameters: an ArrayList of integers, a minimum and maximum integer, and re
marissa [1.9K]

Answer:

In Java:

The method is as follows:

public static int countInRange (ArrayList<Integer> MyList, int min, int max) {  

       int count = 0;

       for (int i = 0; i < MyList.size(); i++)  {

           if(MyList.get(i)>=min && MyList.get(i)<=max){

               count++;

           }  

       }

       return count;

 }

Explanation:

This defines the method

public static int countInRange (ArrayList<Integer> MyList, int min, int max) {

This declares and initializes count to 0  

       int count = 0;

This iterates through the ArrayList

       for (int i = 0; i < MyList.size(); i++)  {

This checks if current ArrayList element is between min and max (inclusive)

           if(MyList.get(i)>=min && MyList.get(i)<=max){

If yes, increase count by 1

               count++;

           }  

       }

This returns count

       return count;

 }

To call the method from main, use:

countInRange(v,m,n)

<em>Where v is the name of the ArrayList, m and n are the min and max respectively.</em>

6 0
3 years ago
Write a program that reads a file containing text. Read each line and send it to the output file, preceded by line numbers. If t
Shtirlitz [24]

Answer:

I am writing a JAVA program:

import java.io.FileReader;  // class used for reading data from a file

import java.io.IOException;  //class used for handling exceptions

import java.io.PrintWriter;  // class used to printing or writing formatted data. It is used when the data to be written contains text and numbers

import java.util.Scanner;   // class used to take input from the user

public class Main  {  //start of the class

public static void main(String[] args)  {//start of main() function body

Scanner input = new Scanner(System.in);  //creates Scanner class object

System.out.print("Enter the input file name: ");  // prompts user to enter the input file name

String input_file = input.next();  //to  read and return the token i.e. input file name and store this into input_file String type variable

System.out.print("Enter the output file name: "); // prompts user to enter the output file name

String output_file = input.next();   /to  read and return the token i.e. output file name and store this into output_file String type variable

try   {/* try  defines a chunk of code to be tested for errors during the execute of this chunk. its a code block for reading from input file and writing to output file. This handles the exception if program cannot create or write to the file indicated. */

   FileReader inFile = new FileReader(input_file);  //creates object inFile of FileReader class to read the input_file contents

   Scanner scan = new Scanner(inFile);  //read and scans the input file

   PrintWriter outFile = new PrintWriter(output_file);  //creates object outFile of PrintWriter class to write to the output file. It is used to write output data in a readable text form.

   int count = 1;    //counts the line number      

   while (scan.hasNextLine())  {  //loop keeps checking for the next line in input file

    String lines = scan.nextLine();  // reads the entire line of the input file and stores that line contents in String lines

    outFile.println("/* " + count + " */ " + lines);  //each line represented with line number enclosed in /* */

    count++;  }   //increments the line number at each iteration    

    outFile.close();        }  //closes the output file after writing the contents from input file with each line of the input file enclosed in  /* */

catch (IOException e)  {  // catching the IOException and prints the following message if program cannot create input_file or write to the output_file

   System.out.println("Error processing file: " + e);    }     }   }

Explanation:

The program is well explained in the comments mentioned with each statement of the above program. The user is prompted to enter input and output file names. Then the program uses a while loop that scans through lines of the input file and count variable counts each line of input file. Then at each iteration the count variable counts a line of input file and line number of each line of the input file is enclosed in /* */ delimiters. The contents of input file, in which the line numbers of text lines of the input file are enclosed in /* */ delimiters, is written to the output file.

The screenshot of the program is attached along with the output file produces as a result of this program execution.

7 0
3 years ago
Which of the following is true of lossy and lossless compression algorithms?
zysi [14]
The answer would be D.
I think I’m not totally sure:)
8 0
3 years ago
What technology standard is commonly used today for hard drives?
Lisa [10]
Solid-state drive (SSD) is the commonly used technology these days for hard drives .It has pretty advantages over hard disk drive(HDD) .
One advantage is ,its speed is unmatchable to HDD and the data is stored in microchips. Unlike HDD,which uses a mechanical arm with a read/write head to move around and read information from the right location on a storage platter ,it collects information directly from microchips .It is simply the oversized version of USB stick .More reliable and sustainable.
3 0
4 years ago
Other questions:
  • PC’s &amp; More has shifted to sales and service of laptops and PCs, where it has the potential to triple the number of its cust
    14·1 answer
  • You have a network that needs 29 subnets while maximizing the number of host addresses available on each subnet. How many bits m
    13·1 answer
  • What inventor patented the first America movie projector
    13·2 answers
  • When would a one way flag variable be used
    10·1 answer
  • Your boss bought a new printer with a USB 3.0 port, and it came with a USB 3.0 cable. Your boss asks you:
    7·2 answers
  • List the applications in the CyberOps menu.
    15·1 answer
  • Which of the following is Microsoft’s fastest, most efficient operating system to date: a. Offering quicker application start up
    14·1 answer
  • Write a program to calculate the farthest in each direction that Gracie was located throughout her travels. Add four print state
    10·1 answer
  • Suppose a class Car and its subclass Honda both have a method called speed as part of the class definition. rentalH refers to an
    5·1 answer
  • What is the definition of shape
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!