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
lukranit [14]
3 years ago
12

Your program will be a line editor. A line editor is an editor where all operations are performed by entering commands at the co

mmand line. Commands include displaying lines, inserting text, editing lines, cutting and pasting text, loading and saving files. For example, a session where the user enters three lines of text and saves them as a new file may appear as:
Engineering
1 answer:
soldier1979 [14.2K]3 years ago
7 0

Answer:

Java program given below

Explanation:

import java.util.*;

import java.io.*;

public class Lineeditor

{

private static Node head;

 

class Node

{

 int data;

 Node next;

 public Node()

 {data = 0; next = null;}

 public Node(int x, Node n)

 {data = x; next =n;}

}

 

public void Displaylist(Node q)

 {if (q != null)

       {  

        System.out.println(q.data);

         Displaylist(q.next);

       }

 }

 

public void Buildlist()

  {Node q = new Node(0,null);

       head = q;

       String oneLine;

       try{BufferedReader indata = new

                 BufferedReader(new InputStreamReader(System.in)); // read data from terminals

                       System.out.println("Please enter a command or a line of text: ");  

          oneLine = indata.readLine();   // always need the following two lines to read data

         head.data = Integer.parseInt(oneLine);

         for (int i=1; i<=head.data; i++)

         {System.out.println("Please enter another command or a new line of text:");

               oneLine = indata.readLine();

               int num = Integer.parseInt(oneLine);

               Node p = new Node(num,null);

               q.next = p;

               q = p;}

       }catch(Exception e)

       { System.out.println("Error --" + e.toString());}

 }

public static void main(String[] args)

{Lineeditor mylist = new Lineeditor();

 mylist.Buildlist();

 mylist.Displaylist(head);

}

}

You might be interested in
To solve the problem, make assumptions for missing data and justify. Given:
finlep [7]

Answer:

5,4,1, this is a explication

6 0
3 years ago
Steam at a pressure of 100 bar and temperature of 600 °C enters an adiabatic nozzle with a velocity of 35 m/s. It leaves the noz
butalik [34]

Answer:

Exit velocity V_2=1472.2 m/s.

Explanation:

Given:

At inlet:

P_1=100 bar,T_=600°C,V_1=35m/s

Properties of steam at 100 bar and 600°C

        h_1=3624.7\frac{KJ}{Kg}

At exit:Lets take exit velocity V_2

We know that if we know only one property inside the dome  then we will find the other property by using steam property table.

Given that dryness or quality of steam at the exit of nozzle  is 0.85 and pressure P=80 bar.So from steam table we can find the other properties.

Properties of saturated steam at 80 bar

   h_f= 1316.61\frac{KJ}{Kg} ,h_g= 2757.8\frac{KJ}{Kg}

So the enthalpy of steam at the exit of turbine  

h_2=h_f+x(h_g-h_f)\frac{KJ}{Kg}

h_2=1316.61+0.85(2757.8-1316.61)\frac{KJ}{Kg}

 h_2=2541.62\frac{KJ}{Kg}

Now from first law for open system

h_1+\dfrac{V_1^2}{2}+Q=h_2+\dfrac{V_2^2}{2}+w

In the case of adiabatic nozzle Q=0,W=0

3624.7+\dfrac{35^2}{2000}+0=2541.62+\dfrac{(V_2)^2}{2000}+0

V_2=1472.2 m/s

So Exit velocity V_2=1472.2 m/s.

4 0
3 years ago
Cho P1= XdaN, P2=3.X daN, P= 2.X (daN). a=1m, b=2m,MCN hình tròn d= (100+X)mm1/ Tính nội lực tại các mặt cắt cách ngàm 0,5m; 1m;
DaniilM [7]

Answer:

Please explain it in English so that i can help or you need someone else who can speak Vietnam

5 0
3 years ago
Water flows in a tube that has a diameter of D= 0.1 m. Determine the Reynolds number if the average velocity is 10 diameters per
Cloud [144]

Answer:

a) Re_{D} = 111896.745, b) Re_{D} = 1.119\times 10^{-7}

Explanation:

a) The Reynolds number for the water flowing in a circular tube is:

Re_{D} = \frac{\rho\cdot v\cdot D}{\mu}

Let assume that density and dynamic viscosity at 25 °C are 997\,\frac{kg}{m^{3}} 0.891\times 10^{-3}\,\frac{kg}{m\cdot s}, respectively. Then:

Re_{D}=\frac{(997\,\frac{kg}{m^{3}} )\cdot (1\,\frac{m}{s} )\cdot (0.1\,m)}{0.891\times 10^{-3}\,\frac{kg}{m\cdot s} }

Re_{D} = 111896.745

b) The result is:

Re_{D}=\frac{(997\,\frac{kg}{m^{3}} )\cdot (10^{-6}\,\frac{m}{s} )\cdot (10^{-7}\,m)}{0.891\times 10^{-3}\,\frac{kg}{m\cdot s} }

Re_{D} = 1.119\times 10^{-7}

6 0
3 years ago
How s the weather like​
scoray [572]

weather is like corono everywhere #stay safe

3 0
3 years ago
Other questions:
  • an existing highway-railway at-grade crossing is being redesigned as grade separated to improve traffic operations. The railway
    8·1 answer
  • For problems 1 and 2, six luminaires, similar to Style E used in the Commercial Building, are to be installed in a room that is
    13·1 answer
  • Aerospace engineers who work for certain government agencies are often required to have security clearance. Explain two reasons
    9·1 answer
  • As the impurity concentration in solid solution of a metal is increased, the tensile strength:________.a) decreasesb) increasesc
    9·1 answer
  • You want to plate a steel part having a surface area of 160 with a 0.002--thick layer of lead. The atomic mass of lead is 207.19
    15·1 answer
  • Milk has a density of as much as 64.6 lb/ft3. What is the gage pressure at the bottom of the straw 6.1 inches deep in the milk?
    7·1 answer
  • Please what is dif<br>ference between building technology and building engineering.​
    14·2 answers
  • A hemispherical shell with an external diameter of 500 mm and a thickness of 20 mm is going to be made by casting, located entir
    12·1 answer
  • What information in drawing's title block identifies the project?
    12·1 answer
  • 3. If nothing can ever be at absolute zero, why does the concept exist?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!