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
Air at 293k and 1atm flow over a flat plate at 5m/s. The plate is 5m wide and 6m long. (a) Determine the boundary layer thicknes
loris [4]

Answer:

a). 8.67 x 10^{-3} m

b).0.3011 m

c).0.0719 m

d).0.2137 N

e).1.792 N

Explanation:

Given :

Temperature of air, T = 293 K

Air Velocity, U = 5 m/s

Length of the plate is L  = 6 m

Width of the plate is b = 5 m

Therefore Dynamic viscosity of air at temperature 293 K is, μ = 1.822 X 10^{-5} Pa-s

We know density of air is ρ = 1.21 kg /m^{3}

Now we can find the Reyonld no at x = 1 m from the leading edge

Re = \frac{\rho .U.x}{\mu }

Re = \frac{1.21 \times 5\times 1}{1.822\times 10^{-5} }

Re = 332052.6

Therefore the flow is laminar.

Hence boundary layer thickness is

δ = \frac{5.x}{\sqrt{Re}}

   = \frac{5\times 1}{\sqrt{332052.6}}

   = 8.67 x 10^{-3} m

a). Boundary layer thickness at x = 1 is δ = 8.67 X 10^{-3} m

b). Given Re = 100000

    Therefore the critical distance from the leading edge can be found by,

     Re = \frac{\rho .U.x}{\mu }

     100000 = \frac{1.21\times5\times x}{1.822 \times10^{-5}}

     x = 0.3011 m

c). Given x = 3 m from the leading edge

    The Reyonld no at x = 3 m from the leading edge

     Re = \frac{\rho .U.x}{\mu }

     Re = \frac{1.21 \times 5\times 3}{1.822\times 10^{-5} }

     Re = 996158.06

Therefore the flow is turbulent.

Therefore for a turbulent flow, boundary layer thickness is

    δ = \frac{0.38\times x}{Re^{\frac{1}{5}}}

       = \frac{0.38\times 3}{996158.06^{\frac{1}{5}}}

       = 0.0719 m

d). Distance from the leading edge upto which the flow will be laminar,

  Re = \frac{\rho \times U\times x}{\mu }

5 X 10^{5} = \frac{1.21 \times 5\times x}{1.822\times 10^{-5}}}

 x = 1.505 m

We know that the force acting on the plate is

F_{D} = \frac{1}{2}\times C_{D}\times \rho \times A\times U^{2}

and C_{D} at x= 1.505 for a laminar flow is = \frac{1.328}{\sqrt{Re}}

                                                                         = \frac{1.328}{\sqrt{5\times10 ^{5}}}

                                                                       = 1.878 x 10^{-3}

Therefore, F_{D} =  \frac{1}{2}\times C_{D}\times \rho \times A\times U^{2}

                                          = \frac{1}{2}\times 1.878\times 10^{-3}\times 1.21\times (5\times 1.505)\times 5^{2}

                                         = 0.2137 N

e). The flow is turbulent at the end of the plate.

  Re = \frac{\rho \times U\times x}{\mu }

       = \frac{1.21 \times 5\times 6}{1.822\times 10^{-5} }

       = 1992316

Therefore C_{D} = \frac{0.072}{Re^{\frac{1}{5}}}

                                           = \frac{0.072}{1992316^{\frac{1}{5}}}

                                           = 3.95 x 10^{-3}

Therefore F_{D} = \frac{1}{2}\times C_{D}\times \rho\times A\times U^{2}

                                           = \frac{1}{2}\times 3.95\times 10^{-3}\times 1.21\times (5\times 6)\times 5^{2}

                                          = 1.792 N

3 0
3 years ago
I just need help on problem B
Komok [63]
The problem b is An example of a law being implemented by bureaucratic agency is____
A. Congress passing legislation by major vote
B. OSHA deciding how hazardous substance should be stored
C. the USPS delivering mail throughout the country
D. A watchdog group blowing the whistle on government corruption
8 0
3 years ago
If you have held a learner's license for more than three months, you may NOT drive _____.
Alex

Answer

Learner's license expires after six months of the date of issue

Explanation:

The learner's license issued to make a person eligible to learn driving in a given time period. In India the learning license is valid for six months after the issuing date but the person have to apply for the driving license within the three months of the issued date. You can drive the vehicles listed in the learner's license document even after the three months of the issuing date. The process of obtaining a driving license have certain process

  • Go to the online web portal of your state driving license authority apply for the driving license and print the application form page from there.
  • Attach this application form and RED CROSS certificate with the file given by the R.T.O office  and submit this to them.
  • The authority will give you date, time and site of the driving test where you have to got there with your vehicle for the test.
  • If you passes the driving test your file will pass and you can take your driving license after some days from the R.T.O office.
7 0
3 years ago
Read 2 more answers
Which of the following is an example of a tax
natta225 [31]

Answer:

A tax is a monetary payment without the right to individual consideration, which a public law imposes on all taxable persons - including both natural and legal persons - in order to generate income. This means that taxes are public-law levies that everyone must pay to cover general financial needs who meet the criteria of tax liability, whereby the generation of income should at least be an auxiliary purpose. Taxes are usually the main source of income of a modern state. Due to the financial implications for all citizens and the complex tax legislation, taxes and other charges are an ongoing political and social issue.

8 0
3 years ago
Read 2 more answers
A reagent added to the analyte solution that changes color when the reaction is complete
Novosadov [1.4K]

Answer:

rfvvvgfvbjjjjbvgggvvvhhjjvvvv

Explanation:

hhbbbjbnjjjjjknnnnbcfvhggcvbgffvvhbvbhbbbnbbhhhhj

6 0
3 years ago
Other questions:
  • A metal rod, 20 mm diameter, is tested in tension (force applied axially). The total extension over a length of 80 mm is 3.04 x
    8·1 answer
  • An ECM (A) is always installed on the vehicle's firewall (B) stores diagnostic
    15·1 answer
  • g A circular oil slick of uniform thickness is caused by a spill of one cubic meter of oil. The thickness of the oil slick is de
    8·1 answer
  • The job objective on your resume should be vague so as to leave all of your options open.
    12·1 answer
  • This style is closest to the cuisine enjoyed by French royalty and nobility.
    9·1 answer
  • Need the answer ASAP
    6·1 answer
  • Determine the 0.25 hour synthetic unit hydrograph for a watershed of the following characteristics:
    12·1 answer
  • The Boeing 787 Dreamliner is billed to be 20% more fuel efficient than the comparable Boeing 767 and will fly at Mach 0.85. The
    6·1 answer
  • You need to lower your lift onto the mechanical load-holding devices to provide structural support before working under the lift
    12·1 answer
  • Can some one plz give me brainlys
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!