Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a singly linked list in order to provide the functionality of the line editor. The entire text in one line is stored in a
Create a singly linked list in order to provide the functionality of the line editor. The entire text in one line is stored in a node of the singly link list. One node of the list contains text and address of next node. (Create Node.h, editor.h, editor.cpp, driver.cpp files) 1. Create a function insertNode () which takes input of the text, and store it in a newly created node. The position of the created nodes depends on the last character of text. If no previous lines exist then this new node will be the first node. If last character of the text is a letter or full stop then the new node will be placed in the next position of the previous node. If the last character is a number then the new node will be created at that position. In this case if there are two nodes currently present in the list and the number indicates 5 position then the third and fourth nodes will have empty data. 2. Create a printList() function to show the working of your created line editor
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started