CMPR 131
Santiago Canyon College
All 27 results
Sort by
-
UnsortedList and SortedList Class File
- Other • 1 pages • 2025
-
- $11.49
- + learn more
The provided code defines two classes for managing lists of integers: `UnsortedList` and `SortedList`. Both classes include the following features: 
 
1. **UnsortedList**: 
 - Stores a fixed number of items (defined by `SIZE` which is set to 10). 
 - Contains private members for storing IDs and the current length of the list. 
 - Public methods include: 
 - Constructor and destructor. 
 - `isFull()` and `isEmpty()` to check the list's status. 
 - `insertItem(int id)` to add an...
-
Linked Lists Class File
- Other • 3 pages • 2025
-
- $15.49
- + learn more
The provided code defines a simple linked list program in C++ with functionalities to insert, delete, and display items either from left to right or right to left. 
 
**Key functions:** 
 
1. **`insertItem(LinkedLists *& head)`**: This function adds a new item to the linked list. It prompts the user for an ID and name, creates a new node, and updates the pointers accordingly. 
 
2. **`deleteItem(LinkedLists *& head)`**: This function deletes a node from the linked list based on user-input ID. It...
-
LinkedLists.h
- Other • 1 pages • 2025
-
- $7.99
- + learn more
The code defines a structure named `LinkedLists` to represent a node in a doubly linked list. Each node contains: 
 
- An integer `ID` 
- A string `name` 
- A pointer `next` that points to the next node in the list 
- A pointer `back` that points to the previous node in the list 
 
The inclusion guards (`#ifndef`, `#define`, `#endif`) prevent multiple definitions of the `LinkedLists` structure if the header file is included multiple times in a program.
-
Review for Linked Lists and Doubly Linked Lists
- Other • 3 pages • 2025
-
- $15.49
- + learn more
The provided code is a simple multiple-choice quiz program focused on Linked Lists and Doubly Linked Lists in C++. It includes a welcome message and instructions for users, along with five questions intended to assess knowledge of the subject. The key components of the code include: 
 
1. **Variables**: A static counter keeps track of the number of questions asked, and a total counts correct answers. There are also variables for user input and answers. 
 
2. **Functions**: The program defines se...
-
Sorted and Unsorted List CPP File
- Other • 3 pages • 2025
-
- $15.49
- + learn more
The code defines two classes, `UnsortedList` and `SortedList`, to manage collections of integers. 
 
### UnsortedList 
- **Constructor/Destructor**: Initializes the list with a length of 0. 
- **insertItem(int id)**: Inserts an integer at the end of the list and increments the length. 
- **deleteItem(int id)**: Searches for an item; if found, it replaces it with the last element and decrements the length. If not found, it outputs a message. 
- **isFull() / isEmpty()**: Checks if the list is ful...
-
Review for UnsortedLists and SortedLists
- Other • 5 pages • 2025
-
- $25.49
- + learn more
The program is a quiz application designed to review concepts related to Unsorted Lists and Sorted Lists. It consists of multiple-choice questions and string input questions, with functionality to evaluate user responses and provide feedback. 
 
Key components include: 
- **Variables**: Used to track user input, correct answers, and scores. 
- **Functions**: 
 - `checkCharAnswers` and `checkStringAnswers`: Validate single character and string answers. 
 - `counting`: Updates the total score ...
-
Lecture 6 Extra Credit Data Structures Queue
- Other • 4 pages • 2025
-
- $15.49
- + learn more
The provided text is a C++ program that implements a basic queue functionality using a `Queue` class. The main features of the program include: 
 
1. **Menu Interface**: Users are presented with a menu that allows them to enqueue (add), dequeue (remove), view the queue, or quit the application. 
 
2. **Enqueue Operation**: Users can add an item to the queue as long as it is not full. If the queue is full, a message is displayed. 
 
3. **Dequeue Operation**: Users can remove an item from the queu...
-
Lecture 6 Extra Credit main.cpp - Class Exercise 2
- Other • 5 pages • 2025
-
- $15.49
- + learn more
The provided code outlines a simple queue management system using a menu-driven interface. The main components are: 
 
1. **Initialization**: The program starts by creating an instance of `NodeQueue` and calling the `makeEmpty` method to reset the queue. 
 
2. **Menu Display**: The `showMenu` function presents the user with options to enqueue, dequeue, display the queue, or quit the program. 
 
3. **User Input Handling**: The program enters a loop where it continually prompts for user input unti...
-
Working with Data Structures: Stack main.cpp
- Other • 1 pages • 2025
-
- $11.49
- + learn more
The code defines a simple program that utilizes a stack data structure. The functionality can be summarized as follows: 
 
1. **Initialization**: A stack called `intStack` of integers is created with a maximum capacity defined by `MAX_ITEMS`, which is set to 5. 
 
2. **Empty Stack Demonstration**: The stack is cleared using the `makeEmpty()` method, and it checks if the stack is empty by popping items (if any) and printing them. Initially, it will show "The contents of the cleared stack are: NU...
-
Working with Data Structures: Stack Template Class
- Other • 1 pages • 2025
-
- $11.49
- + learn more
The provided code defines a generic Stack class template in C++. It allows the creation of a stack with a specified maximum number of items (`MAX_ITEMS`). Key features of the class include: 
 
- Private members to store stack items and track the top index. 
- A constructor to initialize the stack to an empty state. 
- A destructor (currently empty). 
- Methods to: 
 - Clear the stack (`makeEmpty`). 
 - Check if the stack is empty (`isEmpty`). 
 - Check if the stack is full (`isFull`). 
 - Ad...
That summary you just bought made someone very happy. Also get paid weekly? Sell your study resources on Stuvia! Discover all about earning on Stuvia