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
Ipatiy [6.2K]
2 years ago
10

What does the following process describe?

Computers and Technology
1 answer:
denis23 [38]2 years ago
8 0
Virtualization is the answer. And it uses software to create an abstraction layer over computer hardware
You might be interested in
Create an instance of your queue that accepts java.lang.String Objects. Starting with an empty queue, use the enqueue(E e) metho
Aleksandr-060686 [28]

Answer:

Code is given below:

Explanation:

ode.java:

public class Node

{

String data;

Node next;

Node prev;

public Node(String data,Node next, Node prev){

this.next=next;

this.data=data;

this.prev=prev;

}

public Node(){

}

public String getData(){

return data;

}

public void setData(String data){

this.data=data;

}

public Node getNext(){

return next;

}

public void setNext(Node next){

this.next=next;

}

public Node getPrev(){

return prev;

}

public void setPrev(Node prev){

this.prev=prev;

}

}

Linked Queue.java:

public class LinkedQueues {

    Node head ;

   Node tail;

int size=0;

public Oueues(){

   this.head=null;

   this.tail=null;

}

public boolean isEmpty()

{

   return head == tail;

}    

 public int getSize()

    {

          return size;

  }    

 public void insert(String data){

   Node tmp = new Node(data,null,null);

    tmp.data=data;

    tmp.next=null;

    if(head==null){

        head=tail=tmp;

        head.prev=null;

    }

    else{

        tail.next=tmp;

        tmp.prev=tail;

        tail=tmp;

 }    

 }

 public String remove(){

  if(head.next==tail)

      return null;// list empty

  Node tmp=head.next;

  head.next=tmp.next;

  tmp.next.prev=head;

  list();

  return tmp.data;

 }

 public void list(){

     System.out.println("Queues");

     if(size==0){

         System.out.println("İs Empty");

     }

    Node tmp=head;

    while(tmp !=tail.getNext()){

        System.out.println(tmp.getVeri()+" ");

      tmp= tmp.getNext();

    }

     System.out.println();

 }

Linkedstack.java:

public class LinkedStack {

Node head = null;

Node tail = null;

int size=0;

     public int getSize() {

    return size;

      }

  public boolean isEmpty()

      {

   return head == null;

   }    

 public void Push(String data) {

    tail = head;

   head = new Node(data,null,null);

   head.data=data;

   head.next= tail;

   head.prev = null;

   if(tail != null) {

       tail.prev=head;

   }

   size++;

 }

 public void Pop() {

   if (!isEmpty()) {

       head = head.next;   // delete first node

       size--;

   } else {

       System.out.println("İs Empty");

   }

}

  public void Top() {

   Node tmp = head;

   while (tmp != null) {

       System.out.println(tmp.getData());

       tmp = tmp.getNext();

   }

}

 }

ArrayBasedQueue.java

import java.util.LinkedList;

import java.util.Queue;

 

public class ArrayBasedQueue

{

 public static void main(String[] args)

 {

   Queue<Integer> q = new LinkedList<>();

 

   // Adds elements {0, 1, 2, 3, 4} to queue

   for (int i=0; i<5; i++)

    q.add(i);

 

   // Display contents of the queue.

   System.out.println("Elements of queue-"+q);

   int removedele = q.remove();

   System.out.println("removed element-" + removedele);

 

   System.out.println(q);

   int head = q.peek();

   System.out.println("head of queue-" + head);

 

   int size = q.size();

   System.out.println("Size of queue-" + size);

 }

}

ArrayBasedStack.java:

import java.io.*;

import java.util.*;

 

public class ArrayBasedStack

{

static void stack_push(Stack<Integer> stack)

{

for(int i = 0; i < 5; i++)

{

stack.push(i);

}

}

 

// Popping element from the top of the stack

static void stack_pop(Stack<Integer> stack)

{

System.out.println("Pop :");

 

for(int i = 0; i < 5; i++)

{

Integer y = (Integer) stack.pop();

System.out.println(y);

}

}

 }

TestTimes.java:

public class TestTimes implements TestTimesInterface

{

 public static enum TimeUnits {};

 public static enum MemoryUnits{};

}

Driver.java:

public class driver

{

public static void main(String args[])

{

   Scanner s = new Scanner(System.in);

   LinkedStack y = new LinkedStack();

   LinkedQueues k = new LinkedQueues();

   ArrayBasedStack as=new ArrayBasedStack();

     ArrayBasedQueue as=new ArrayBasedQueue();

   FileWriter fwy;

   FileWriter fwk;

   File stack = new File("stack.txt");

   if (!stack.exists()) {

       stack.createNewFile();

   } else {

       System.out.println("already exists ");

   }

   BufferedReader reader = null;

   reader = new BufferedReader(new FileReader(stack));

   String line = reader.readLine();

   while (line != null) {

       y.Push(line = reader.readLine());

       System.out.println(line);

   }

   File queue = new File("queue.txt");

   if (!queue.exists()) {

       queue.createNewFile();

   } else {

       System.out.println("already exists ");

   }

   BufferedReader read = null;

   read = new BufferedReader(new FileReader(queue));

   String lines = read.readLine();

   while (lines != null) {

       lines = read.readLine();

       k.insert(lines);

       System.out.println(lines);

   }

int choice;

     System.out.println("1. Stack out- queue add");

     System.out.println("2. Stack add- queue out");

     System.out.println("3. Stack and queue ");

     System.out.println("4. File writer");

     choice = s.nextInt();

   switch (choice) {

       case 1:

           k.insert(s.next());

           k.list();

           y.pop();

           break;

       case 2:

         y.Push(s.next());

           y.Top();

         k.remove();

           break;

       case 3:

           y.Top();

           k.list();

           break;

       case 4:

           fwy = new FileWriter(stack);

           Node no = y.head;

           while (no.next != null) {

               fwy.write("\n" + no.data);

               no = no.next;

           }

           fwy.flush();

           fwy.close();

           fwk = new FileWriter(queue);

           Node noo = k.head;

           while (noo.next != null) {

               fwk.write("\n" + noo.data);

               noo = noo.next;

           }

           fwk.flush();

           fwk.close();

           break;

        }

 

}

}

6 0
3 years ago
Computers and Technology:
Monica [59]

Answer:

The algorithm:

Input days

sum = 0

for i = 1 to days

   input text

   sum = sum + text

end for

average = sum/days

print average

The program in pascal:

var days, sum, text, i:integer;

var average : real;

Begin

    write ('Days: '); readln(days);

    sum:=0;

    for i := 1 to days do begin

         write ('Text: ');  readln(text);  

         sum:=sum+text;

    end;

    average := (sum/days);

    writeln ('The average text is' , average);

End.

Explanation:

This declares all variables

var days, sum, text, i:integer;

var average : real;

This begins the program

Begin

This gets the number of days from the user

    write ('Days: '); readln(days);

Initialize sum to 0

    sum:=0;

This iterates through the days

    for i := 1 to days do begin

This gets the text for each day

         write ('Text: ');   readln(text);  

This sums up the texts

         sum:=sum+text;

End loop

    end;

Calculate average

    average := (sum/days);

Print average

    writeln ('The average text is' , average);

End program

End.

3 0
3 years ago
3. Of the following pieces of information in a document, for which would you most likely insert a mail merge field? A. First nam
yuradex [85]
I would suggest the answer would be both A and D, mail merge is used to specify different field for different recipients. 
4 0
2 years ago
Read 2 more answers
Write a program that will open the file random.txt and calculate and display the following: A. The number of numbers in the file
Rama09 [41]

Answer:

Here is the C++ program:

#include <iostream>  //to use input output functions

#include <fstream>  //to manipulate files

using namespace std;  //to identify objects like cin cout

int main(){  //start of main function

  ifstream file;   //creates an object of ifstream

   file.open("random.txt"); //open method to open random.txt file using object file of ifstream

       

    int numCount = 0;  //to store the number of all numbers in the file          

    double sum = 0;   //to store the sum of all numbers in the file

    double average = 0.0;   //to store the average of all numbers in the file

    int number ; //stores numbers in a file

                 

        if(!file){   //if file could not be opened

           cout<<"Error opening file!\n";    }   //displays this error message

       

       while(file>>number){   //reads each number from the file till the end of the file and stores into number variable

           numCount++; //adds 1 to the count of numCount each time a number is read from the file          

           sum += number;  }  //adds all the numbers and stores the result in sum variable

           average = sum/numCount;  //divides the computed sum of all numbers by the number of numbers in the file

     

       cout<<"The number of numbers in the file: "<<numCount<<endl;  //displays the number of numbers

       cout<<"The sum of all the numbers in the file: "<<sum<<endl;  //displays the sum of all numbers

       cout<<"The average of all the numbers in the file: "<< average<<endl;  //displays the average of all numbers

       file.close();     }  //closes the file    

   

Explanation:

Since the random.txt is not given to check the working of the above program, random.txt is created and some numbers are added to it:

35

48

21

56

74

93

88

109

150

16

while(file>>number) statement reads each number and stores it into number variable.

At first iteration:

35 is read and stored to number

numCount++;  becomes

numCount = numCount + 1

numCount = 1      

sum += number; this becomes:

sum = sum + number

sum = 0 + 35

sum = 35

At second iteration:

48 is read and stored to number

numCount++;  becomes

numCount = 1+ 1

numCount = 2    

sum += number; this becomes:

sum = sum + number

sum = 35 + 48

sum = 83

So at each iteration a number is read from file, the numCount increments to 1 at each iteration and the number is added to the sum.

At last iteration:

16 is read and stored to number

numCount++;  becomes

numCount = 9 + 1

numCount = 10    

sum += number; this becomes:

sum = sum + number

sum = 674 + 16

sum = 690

Now the loop breaks and the program moves to the statement:

       average = sum/numCount;  this becomes:

       average = 690/10;

       average = 69

So the entire output of the program is:

The number of numbers in the file: 10                                                                                                           The sum of all the numbers in the file: 690                                                                                                     The average of all the numbers in the file: 69

The screenshot of the program and its output is attached.

5 0
3 years ago
Fill in the table below of the Interactive Word Wall. You are provided with the
kakasveta [241]

Answer:

that is so long i just want points

Explanation:

7 0
2 years ago
Other questions:
  • Write a program that assigns two integer values from standard input to the variables int1 and int2, then prints "true" if they a
    10·1 answer
  • All of the following except one are issues that should be covered in an AUP. Which one is the exception?
    5·1 answer
  • _____ are considered to be the most important element in a computer-based information system.
    8·1 answer
  • Each cout statement has a syntax error. Type the first cout statement, and press Run to observe the error message. Fix the error
    11·1 answer
  • Write the code that creates a public class named Vehicle that has one private data member. The private data member is an integer
    13·1 answer
  • What percentage of business are using social media today
    14·1 answer
  • How you use ict today and how will you use it tomorrow
    14·1 answer
  • What is phishing?
    14·1 answer
  • Capstone Project part 11 quiz
    6·1 answer
  • What is the difference between a field and an infoobject? What is the advantage of using infoobjects instead of fields in an ads
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!