TWO Midterm 1 Assessments., Exams of Computer Science

Instructions for implementing a linked list with basic functionality. The program prompts the user for data, stores it in the linked list, and performs requested functionality in the requested order. general requirements and specific requirements for implementing a linked list. The linked list must be singly linked, doubly linked, or circular linked. specific functionality requirements, including inserting data, searching for data, deleting data, sorting data, and calculating the sum, product, or average of data elements. An extra credit question involves implementing a node class with a number field in the private area.

Typology: Exams

2021/2022

Available from 10/03/2022

the_blindGhost
the_blindGhost 🇺🇸

7 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Implementing a Linked List with some basic functionality.
Your program must prompt the user for data, store the data in the Linked List, and then
perform the requested functionality in the requested order. The rubric is implemented
for your convenience.
We will use your program as below and will provide intended input.
Note: (If your program does not compile, your submission
will not be graded)!
Requirements
General (10 Points)
Each functionality MUST be implemented as a separate function,
othough the function does not need to be declared and defined in a
separate file.
No arrays or dynamic arrays are allowed.
No global variables are allowed.
No seperate .h or .hpp is required, but are allowed.
Your source file (and .zip should you need to) must be
named abc1234Exam1.cpp, where abc1234 is YOUR EUID.
Appropriate, informative messages must be provided for prompts and
outputs.
oYou may include input/output libraries.
You must have the correct File Names and Comments within your code.
Have a header comment with your name and EUID.
You must specify what you chose to implement in your comments and/or
output.
When the program starts, it should provide the user with options to perform
each functionality above.
No Warnings!
IF YOU FAIL TO IMPLEMENT AT LEAST HALF OF THE GENERAL REQUIREMENTS:
YOUR FINAL GRADE FOR THIS PORTION WILL BE HALVED!
Linked List (20 Points)
You will be required to implement the type of Linked List given to you in the previous
questions. It should have been one of the following:
Singly Linked
Doubly Linked
Circular Linked
pf3

Partial preview of the text

Download TWO Midterm 1 Assessments. and more Exams Computer Science in PDF only on Docsity!

Implementing a Linked List with some basic functionality.

Your program must prompt the user for data, store the data in the Linked List, and then perform the requested functionality in the requested order. The rubric is implemented for your convenience. We will use your program as below and will provide intended input.

Note: (If your program does not compile, your submission

will not be graded)!

Requirements

General (10 Points)  Each functionality MUST be implemented as a separate function, o though the function does not need to be declared and defined in a separate file.  No arrays or dynamic arrays are allowed.  No global variables are allowed.  No seperate .h or .hpp is required, but are allowed.  Your source file (and .zip should you need to) must be named abc1234Exam1.cpp , where abc1234 is YOUR EUID.  Appropriate, informative messages must be provided for prompts and outputs. o You may include input/output libraries.  You must have the correct File Names and Comments within your code.  Have a header comment with your name and EUID.  You must specify what you chose to implement in your comments and/or output.  When the program starts, it should provide the user with options to perform each functionality above.  No Warnings! IF YOU FAIL TO IMPLEMENT AT LEAST HALF OF THE GENERAL REQUIREMENTS:

YOUR FINAL GRADE FOR THIS PORTION WILL BE HALVED!

Linked List (20 Points) You will be required to implement the type of Linked List given to you in the previous questions. It should have been one of the following:  Singly Linked  Doubly Linked  Circular Linked

Functionality

  1. Insert data from the user. (5 Points)
    1. We will use integers.
  2. Search for the first instance specified from a user. (5 Points)
  3. Delete the first instance specified from a user. (5 Points)
  4. Sort all the data elements in ascending order using the sort algorithm provided to you in the previous questions. 1. Should be one of the following: (20 Points) I. Selection Sort II. Bubble Sort III. Insertion Sort
  5. A. In this order: (5 Points) I. First: print the current (pre-sorted) list. II. Second: Sort the list. III. Third: Print the sorted list.
  6. Choose ONE of the following functionalities to implement: (5 Points) A. Calculate and output the sum of every data element. B. Calculate and output the product of every data element. C. Calculate and output the average of all data elements
  7. Choose ONE of the following functionalities to implement: (5 Points) A. Reverse the current order of the data elements B. Remove all duplicate data elements C. Count and output the total number of data elements

Question 2

This is an extra credit question. Implement a node class that contains  a number field (int) in the private area,