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
What are the success factors for mechanical engineering?
Eva8 [605]

Answer:

-effective technical skills.

-the ability to work under pressure.

-problem-solving skills.

-creativity.

-interpersonal skills.

-verbal and written communication skills.

-commercial awareness.

-teamworking skills.

Explanation:

is this what ur looking for? if so there ya go lol

7 0
3 years ago
Read 2 more answers
You are hitting a nail with a hammer (mass of hammer =1.8lb) the initial velocity of the hammer is 50 mph (73.33 ft/sec). The ti
Archy [21]

Answer:

The nail exerts a force of 573.88 Pounds on the Hammer in positive j direction.

Explanation:

Since we know that the force is the rate at which the momentum of an object changes.

Mathematically \overrightarrow{F}=\frac{\Delta \overrightarrow{p}}{\Delta t}

The momentum of any body is defines as \overrightarrow{p}=mass\times \overrightarrow{v}

In the above problem we see that the moumentum of the hammer is reduced to zero in 0.023 seconds thus the force on the hammer is calculated using the above relations as

\overrightarrow{F}=\frac{m(\overrightarrow{v_{f}}-\overrightarrow{v_{i}})}{\Delta t}

\overrightarrow{F}=\frac{m(0-(-73.33)}{0.23}=\frac{1.8\times 73.33}{0.23}=573.88Pounds

6 0
3 years ago
Briefly explain how each of the following influences the tensile modulus of a semicrystalline polymer and why:(a) molecular weig
marin [14]

Answer:

(a) Increases

(b) Increases

(c) Increases

(d) Increases

(e) Decreases

Explanation:

The tensile modulus of a semi-crystalline polymer depends on the given factors as:

(a) Molecular Weight:

It increases with the increase in the molecular weight of the polymer.

(b) Degree of crystallinity:

Tensile strength of the semi-crystalline polymer increases with the increase in the degree of crystallinity of the polymer.

(c) Deformation by drawing:

The deformation by drawing in the polymer results in the finely oriented chain structure of the polymer with the greater inter chain secondary bonding structure resulting in the increase in the tensile strength of the polymer.

(d) Annealing of an undeformed material:

This also results in an increase in the tensile strength of the material.

(e) Annealing of  a drawn material:

A semi crystalline material which is drawn when annealed results in the decreased tensile strength of the material.

5 0
3 years ago
What is an example of a class 2 lever?
9966 [12]

Answer:

A wheelbarrow, a bottle opener, and an oar are examples of second class levers

6 0
3 years ago
Read 2 more answers
Liquid benzene and liquid n-hexane are blended to form a stream flowing at a rate of 1700 lbm/h. An on-line densitometer (an ins
Taya2010 [7]
Let me think of that
5 0
3 years ago
Other questions:
  • True or False: Drag and tailwind are examples of a contact force.<br> tyy guyss
    14·1 answer
  • In order to build a skyscraper Builders, Inc. hires 400 construction workers and 50 managers. Builders, Inc. represents A entrep
    8·1 answer
  • What does WCS stand for? A. Western CAD System B. Worldwide Coordinate Sectors C. World Coordinate System D. Wrong CAD Settings
    10·1 answer
  • Rosalind franklin<br> What was she famous for
    14·1 answer
  • Which of the following is not an example of heat generation? a)- Exothermic chemical reaction in a solid b)- Endothermic Chemica
    15·1 answer
  • A cylindrical bar of metal having a diameter of 20.9 mm and a length of 205 mm is deformed elastically in tension with a force o
    9·1 answer
  • An aggregate blend is composed of 65% coarse aggregate by weight (Sp. Cr. 2.635), 36% fine aggregate (Sp. Gr. 2.710), and 5% fil
    5·1 answer
  • A steady state filtration process is used to separate silicon dioxide (sand) from water. The stream to be treated has a flow rat
    5·1 answer
  • 8. If you push a 2000 N weight up a ramp with 400 N of force and you raise the weight 1 meter,
    9·1 answer
  • Describe two fundamental reasons why flexural strength should depend on porosity
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!