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
Tires can be recycled instead of thrown out.<br> True<br> False
Arisa [49]

Answer:

True :)

Explanation:

You can recycle it! Tire recycling is the most practical and environment-friendly way of disposing of old and worn-out tires. Due to their inherent durability, large volume and environment and health risks, tires are one of the most problematic sources of solid wastes.

Hope it helped have a nice day! :)

8 0
2 years ago
Jodie bought some shirts for 6$ each marge brought some shirts for 8$ each
Alex_Xolod [135]

Answer:

you need more details but if you have to find the difference, its $2.00

Explanation:

8-6=2

3 0
3 years ago
Steam enters a turbine steadily at 7 MPa and 600°C with a velocity of 60 m/s and leaves at 25 kPa with a quality of 95 percent.
Rufina [12.5K]

Answer:

a) \dot m = 16.168\,\frac{kg}{s}, b) v_{out} = 680.590\,\frac{m}{s}, c) \dot W_{out} = 18276.307\,kW

Explanation:

A turbine is a steady-state devices which transforms fluid energy into mechanical energy and is modelled after the Principle of Mass Conservation and First Law of Thermodynamics, whose expressions are described hereafter:

Mass Balance

\frac{v_{in}\cdot A_{in}}{\nu_{in}} - \frac{v_{out}\cdot A_{out}}{\nu_{out}} = 0

Energy Balance

-q_{loss} - w_{out} + h_{in} - h_{out} = 0

Specific volumes and enthalpies are obtained from property tables for steam:

Inlet (Superheated Steam)

\nu_{in} = 0.055665\,\frac{m^{3}}{kg}

h_{in} = 3650.6\,\frac{kJ}{kg}

Outlet (Liquid-Vapor Mix)

\nu_{out} = 5.89328\,\frac{m^{3}}{kg}

h_{out} = 2500.2\,\frac{kJ}{kg}

a) The mass flow rate of the steam is:

\dot m = \frac{v_{in}\cdot A_{in}}{\nu_{in}}

\dot m = \frac{\left(60\,\frac{m}{s} \right)\cdot (0.015\,m^{2})}{0.055665\,\frac{m^{3}}{kg} }

\dot m = 16.168\,\frac{kg}{s}

b) The exit velocity of steam is:

\dot m = \frac{v_{out}\cdot A_{out}}{\nu_{out}}

v_{out} = \frac{\dot m \cdot \nu_{out}}{A_{out}}

v_{out} = \frac{\left(16.168\,\frac{kg}{s} \right)\cdot \left(5.89328\,\frac{m^{3}}{kg} \right)}{0.14\,m^{2}}

v_{out} = 680.590\,\frac{m}{s}

c) The power output of the steam turbine is:

\dot W_{out} = \dot m \cdot (-q_{loss} + h_{in}-h_{out})

\dot W_{out} = \left(16.168\,\frac{kg}{s} \right)\cdot \left(-20\,\frac{kJ}{kg} + 3650.6\,\frac{kJ}{kg} - 2500.2\,\frac{kJ}{kg}\right)

\dot W_{out} = 18276.307\,kW

6 0
2 years ago
A rod that was originally 100-cm-long experiences a strain of 82%. What is the new length of the rod?
lisabon 2012 [21]

Answer:

The new length of the rod is 182 cm.

Explanation:

Given that a rod that was originally 100-cm-long experiences a strain of 82%, to determine what is the new length of the rod, the following calculation must be performed:

100 x 1.82 = X

182 = X

 

Therefore, the new length of the rod is 182 cm.

7 0
3 years ago
Consider a dip-coating process where a very long (assume infinitely long) wire(solid) with radius, ri, is being pulled verticall
Gekata [30.6K]

Answer:

See explaination and attachment.

Explanation:

Navier-Stokes equation is to momentum what the continuity equation is to conservation of mass. It simply enforces F=ma in an Eulerian frame.

The starting point of the Navier-Stokes equations is the equilibrium equation.

The first key step is to partition the stress in the equations into hydrostatic (pressure) and deviatoric constituents.

The second step is to relate the deviatoric stress to viscosity in the fluid.

The final step is to impose any special cases of interest, usually incompressibility.

Please kindly check attachment for step by step solution.

6 0
3 years ago
Other questions:
  • A student is using a 12.9 ft ramp to raise an object 6 ft above the ground.
    5·1 answer
  • What is a quasi-equilibrium process? What is its importance in engineering?
    14·1 answer
  • Ventajas motor avion
    5·1 answer
  • Assume a steel pipe of inner radius r1= 20 mm and outer radius r2= 25 mm, which is exposed to natural convection at h = 50 W/m2.
    12·1 answer
  • How much memory can a 32 -bit processor support ?
    13·1 answer
  • QUESTION:
    13·1 answer
  • Describe in detail the process of making a collapsable bowl.​
    11·1 answer
  • Which 1 of the following did women NOT do during WWII?
    6·2 answers
  • A gas turbine receives a mixture having the following molar analysis: 10% CO2, 19% H2O, 71% N2 at 720 K, 0.35 MPa and a volumetr
    5·1 answer
  • The enforcement of OSHA standards is provided by federal and state
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!