1. Start with analysing the problem by using a flowchart/pseudo code. 2. As mention above, build...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Start with analysing the problem by using a flowchart/pseudo code. 2. As mention above, build a C++ program based on the appropriate method/function. You are free to create your own menu and display. Consider the following case: User have to input a set of numbers in the linked list. The program should be able to print out and search a number the list. The program can also be able to sort the linked list in ascending order. After that, the program will eliminate any duplicates number from the list, such that output list contains only unique number. The program must consist of the following method function: a) menu()- as interface for the user b) add_list(Node) to add number to the list c) show_list() to display the lists d) search number(Node) - to search a number in the list e) sort_list()-to sort the number in the list f) delete_duplicate()-to eliminate any duplicates number in the list g) delete_list()-to delete the list Example, segment of output: How many numbers you want to enter: 6 Please enter a number: 5 Please enter a number: 7 Please enter a number: 5 Please enter a number: 1 Please enter a number: 3 Please enter a number: 3 Show list: 5-7-5->1-3-3-NULL Find number: 2 2 is not in the list! Sorted list: 1->3-> 3-5-5-7-> NULL Updated list: 1-3-5-7-> NULL Delete list! Declaration node and functions: //declaration of node struct Node( int d_num; Node *dlink; }; void menu (); void add list (Node); void show_list(); void search list (Node); void sort list(); void delete duplicate(); void delete_list(); 1. Start with analysing the problem by using a flowchart/pseudo code. 2. As mention above, build a C++ program based on the appropriate method/function. You are free to create your own menu and display. Consider the following case: User have to input a set of numbers in the linked list. The program should be able to print out and search a number the list. The program can also be able to sort the linked list in ascending order. After that, the program will eliminate any duplicates number from the list, such that output list contains only unique number. The program must consist of the following method function: a) menu()- as interface for the user b) add_list(Node) to add number to the list c) show_list() to display the lists d) search number(Node) - to search a number in the list e) sort_list()-to sort the number in the list f) delete_duplicate()-to eliminate any duplicates number in the list g) delete_list()-to delete the list Example, segment of output: How many numbers you want to enter: 6 Please enter a number: 5 Please enter a number: 7 Please enter a number: 5 Please enter a number: 1 Please enter a number: 3 Please enter a number: 3 Show list: 5-7-5->1-3-3-NULL Find number: 2 2 is not in the list! Sorted list: 1->3-> 3-5-5-7-> NULL Updated list: 1-3-5-7-> NULL Delete list! Declaration node and functions: //declaration of node struct Node( int d_num; Node *dlink; }; void menu (); void add list (Node); void show_list(); void search list (Node); void sort list(); void delete duplicate(); void delete_list();
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
Homzmart was founded in late 2019 by Daraz's former COO Mahmoud Ibrahim and Ibrahim Mohammed who led Jumia's h homzmart logistics development in Egypt to make furniture discovery and shopping easier...
-
From its headquarters in Calgary and its development, operations, and marketing facilities in Arizona, Kansas, and Texas, Hemisphere GPS Inc. designs, develops, and manufactures commercial and...
-
A summary of the transactions affecting the stockholders' equity of Riverton Corporation during the current year follows. Prior period adjustment (net of income tax...
-
Using one beam element, find the natural frequencies of the uniform pinned-free beam shown in Fig. 12.29. p. A, I, E FIGURE 12.29 Pinned-free beam.
-
STAR Co. provides paper to smaller companies with volumes that are not large enough to warrant dealing directly with the paper mill. STAR receives 100-feet-wide paper rolls from the mill and cuts the...
-
Question 1: This week's lecture materials revealed to you a wide range of programs and best practices in the area of diversity and inclusion (D&I) that are utilized by leading companies, such as...
-
The carrying amount of a piece of machinery at 30 June 2017 was $580,000. At this date there was an indication that the machinery might be impaired. In preparing for the impairment testing, you have...
-
How do we go about knowing things? Or how do we separate true ideas from false ideas? Or how do we know what is true? or "How can we be confident when we have located 'truth'?" "What are the...
-
Perform a traditional Dupont Disaggregation by decomposing ROE into profit margin, asset turnover and financial leverage. What inferences can you draw from the disaggregation? Perform a RNOA...
-
Question 19 Energy intensity is considered a measure of the energy efficiency of a nation's economy. It measures the quantity of energy needed to produce one unit (usually one dollar) of gross...
-
6. Suppose that an economist working for firm operating in a competitive market has estimated the firm's total cost function to be: C (Q)=450+15Q+2Q 2 and a marginal cost function MC (Q)=15+4Q. If...
-
When analyzing financial statements, what is the class of ratios that indicates an organization's ability to meet its long-term financial obligations? When performing variance analysis of nurse...
-
Recall one or more times when you were the new person in an organization. What helped make the transition easier? What hindered you or others? What could the organization(s) have done to make the...
-
Problem 3.5 (4 points). We will prove, in steps, that rank (L) = rank(LT) for any LE Rnxm (a) Prove that rank (L) = rank (LTL). (Hint: use Problem 3.4.) (b) Use part (a) to deduce that that rank(L) =...
-
Why is it important to decompose a system into individual components?
-
If a pattern is used to model an overly broad portion of a system, the generality of resulting pattern is sacrificed. Explain with the help of an example.
-
Explain why a pattern representing rental system will not be complete and accurate.
Study smarter with the SolutionInn App