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
Tasya [4]
3 years ago
10

The central processing unit (CPU) processes the data in a computer systenpical data processing includes:

Computers and Technology
1 answer:
spin [16.1K]3 years ago
5 0
Permoryin to, tho e k k j d
You might be interested in
Rideshare companies like Uber or Lyft track the x,y coordinates of drivers and customers on a map. If a customer requests a ride
TiliK225 [7]

Answer:

The program in Java is as follows:

import java.util.*;

public class Main{

 public static void main (String[]args){

   Scanner input = new Scanner(System.in);

   double user[] = new double[2];    double dr1[] = new double[2];

   double dr2[] = new double[2];    double dr3[] = new double[2];    

   System.out.print("Enter user coordinates: ");

   for(int i =0;i<2;i++){        user[i] = input.nextDouble();    }

   System.out.print("Enter driver 1 coordinates: ");

   for(int i =0;i<2;i++){        dr1[i] = input.nextDouble();    }

   System.out.print("Enter driver 2 coordinates: ");

   for(int i =0;i<2;i++){        dr2[i] = input.nextDouble();    }

   System.out.print("Enter driver 3 coordinates: ");

   for(int i =0;i<2;i++){        dr3[i] = input.nextDouble();    }

   double dr1dist = Math.abs(user[0] - dr1[0]) + Math.abs(user[1] - dr1[1]);

   double dr2dist = Math.abs(user[0] - dr2[0]) + Math.abs(user[1] - dr2[1]);

   double dr3dist = Math.abs(user[0] - dr3[0]) + Math.abs(user[1] - dr3[1]);

   System.out.println("Estimated pickup time of driver 1 "+(3.5 * dr1dist)+" minutes");

   System.out.println("Estimated pickup time of driver 2 "+(3.5 * dr2dist)+" minutes");

   System.out.println("Estimated pickup time of driver 3 "+(3.5 * dr3dist)+" minutes");

 }

}

Explanation:

The following array declarations are for the customer and the three drivers

<em>    double user[] = new double[2];    double dr1[] = new double[2];</em>

<em>    double dr2[] = new double[2];    double dr3[] = new double[2];    </em>

This prompts the user for the customer's coordinates

   System.out.print("Enter user coordinates: ");

This gets the customer's coordinate

   for(int i =0;i<2;i++){        user[i] = input.nextDouble();    }

This prompts the user for the driver 1 coordinates

   System.out.print("Enter driver 1 coordinates: ");

This gets the driver 1's coordinate

   for(int i =0;i<2;i++){        dr1[i] = input.nextDouble();    }

This prompts the user for the driver 2 coordinates

   System.out.print("Enter driver 2 coordinates: ");

This gets the driver 2's coordinate

   for(int i =0;i<2;i++){        dr2[i] = input.nextDouble();    }

This prompts the user for the driver 3 coordinates

   System.out.print("Enter driver 3 coordinates: ");

This gets the driver 3's coordinate

   for(int i =0;i<2;i++){        dr3[i] = input.nextDouble();    }

This calculates the distance between driver 1 and the customer

   double dr1dist = Math.abs(user[0] - dr1[0]) + Math.abs(user[1] - dr1[1]);

This calculates the distance between driver 2 and the customer

   double dr2dist = Math.abs(user[0] - dr2[0]) + Math.abs(user[1] - dr2[1]);

This calculates the distance between driver 3 and the customer

   double dr3dist = Math.abs(user[0] - dr3[0]) + Math.abs(user[1] - dr3[1]);

The following print statements print the estimated pickup time of each driver

<em>   System.out.println("Estimated pickup time of driver 1 "+(3.5 * dr1dist)+" minutes");</em>

<em>    System.out.println("Estimated pickup time of driver 2 "+(3.5 * dr2dist)+" minutes");</em>

<em>    System.out.println("Estimated pickup time of driver 3 "+(3.5 * dr3dist)+" minutes");</em>

7 0
3 years ago
List any two programs that are required to play multimedia products
AnnyKZ [126]

Answer:

the two programs to play multimedia products are;windows media player and VLC media player and the two programs to create multimedia products are;photoshop and PowerPoint

3 0
2 years ago
identify three ways we use analog and digital signals in our everyday lives. Describe how radio telescopes are used to explore s
spayn [35]
We use analog and digital signals in our everyday lives with the radio, the cell phone and with our own computers. our computers and our cell phones are all digital now but radio's are still considered analog. Radio telescopes explore space by using radio waves and signals to almost like scan space and collect data like a sonar in a submarine. 
8 0
3 years ago
Read 2 more answers
In a proper webpage, which tag holds all of a webpages visble HTML
Furkat [3]
If I remember correctly, I believe it's <body></body>
6 0
3 years ago
Read 2 more answers
Design a class that has an array of floating-point numbers. The constructor should accept an integer argument and dynamically al
attashe74 [19]

Answer:

See explaination for the code

Explanation:

Here is the code

class NumberArray

{

private:

float *aptr; // Pointer to the array

int arraySize; // Holds the array size

float max,min,avg;

public:

NumberArray(int); // Constructor

~NumberArray(); // Destructor

int size() const // Returns the array size

{ return arraySize; }

void storeNumber(float num,int ele);

float retrieveNumber(int ele);

float getHighest();

float getLowest();

float getAverage();

};

//*******************************************************

// Constructor for IntArray class. Sets the size of the *

// array and allocates memory for it. *

//*******************************************************

NumberArray::NumberArray(int s)

{

arraySize = s;

aptr = new float [s];

for (int count = 0; count < arraySize; count++)

*(aptr + count) = 0;

}

//******************************************************

// Destructor for IntArray class. *

//******************************************************

NumberArray::~NumberArray()

{

if (arraySize > 0)

delete [] aptr;

}

void NumberArray::storeNumber(float num,int ele)

{

if(ele<arraySize)

*(aptr+ele)=num;

}

float NumberArray::retrieveNumber(int ele)

{

return *(aptr+ele);

}

float NumberArray::getHighest()

{

float high=*(aptr+0);

for(int i=1;i<arraySize;i++)

if(high<*(aptr+i))

high=*(aptr+i);

return high;

}

float NumberArray::getLowest()

{

float low=*(aptr+0);

for(int i=1;i<arraySize;i++)

if(low>*(aptr+i))

low=*(aptr+i);

return low;

}

float NumberArray:: getAverage()

{

float ag=0;

for(int i=1;i<arraySize;i++)

ag+=*(aptr+i);

ag=ag/arraySize;

return ag;

}

//Header file section

#include <iostream>

using namespace std;

int main()

{

const int SIZE = 10; // Array size

// Define an IntArray with 10 elements.

NumberArray table(SIZE);

//function call to store values

table.storeNumber(1,0);

table.storeNumber(3,1);

table.storeNumber(7,2);

table.storeNumber(2,3);

//display values

cout<<"Highest value:"<<table.getHighest()<<endl;

cout<<"Lowest Value:"<<table.getLowest()<<endl;

cout<<"Average:"<<table.getAverage()<<endl;

///pause system for a while

system("pause");

return 0;

}

6 0
2 years ago
Other questions:
  • If you want to boot from a hard drive what must it have
    6·1 answer
  • Help, please!! A file named "games.txt" exists and has 80 lines of data. You open the file with the following line of code. aFil
    6·1 answer
  • The software used to help run the computer hardware is the _____.
    9·2 answers
  • A debugging process where you, the programmer, pretend you are a computer and step through each statement while recording the va
    11·1 answer
  • How many bytes does a common processor require to represent an integer?
    7·1 answer
  • Pls Help need it before 1pm PLS.
    15·2 answers
  • Which symbol is at the beginning and end of a multiline comment block? ### &amp;&amp;&amp; %%% """
    14·1 answer
  • State True or False: 1. Application software can run without the presence of system software. 2. . A language processor translat
    14·1 answer
  • Which of the following statements is true regarding a user account? Once a user account has been created, it cannot be completel
    8·1 answer
  • You have imported a library with the birthMonth() function. Based on the API, how many strings are inputed to calculate the birt
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!