CMPR 131

Santiago Canyon College

Here are the best resources to pass CMPR 131. Find CMPR 131 study guides, notes, assignments, and much more.

All 27 results

Sort by

UnsortedList and SortedList Class File
  • UnsortedList and SortedList Class File

  • Other • 1 pages • 2025
  • 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...
    (0)
  • $11.49
  • + learn more
Linked Lists Class File
  • Linked Lists Class File

  • Other • 3 pages • 2025
  • 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...
    (0)
  • $15.49
  • + learn more
LinkedLists.h
  • LinkedLists.h

  • Other • 1 pages • 2025
  • 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.
    (0)
  • $7.99
  • + learn more
Review for Linked Lists and Doubly Linked Lists
  • Review for Linked Lists and Doubly Linked Lists

  • Other • 3 pages • 2025
  • 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...
    (0)
  • $15.49
  • + learn more
Sorted and Unsorted List CPP File
  • Sorted and Unsorted List CPP File

  • Other • 3 pages • 2025
  • 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...
    (0)
  • $15.49
  • + learn more
Review for UnsortedLists and SortedLists
  • Review for UnsortedLists and SortedLists

  • Other • 5 pages • 2025
  • 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 ...
    (0)
  • $25.49
  • + learn more
Lecture 6 Extra Credit Data Structures Queue
  • Lecture 6 Extra Credit Data Structures Queue

  • Other • 4 pages • 2025
  • 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...
    (0)
  • $15.49
  • + learn more
Lecture 6 Extra Credit main.cpp - Class Exercise 2
  • Lecture 6 Extra Credit main.cpp - Class Exercise 2

  • Other • 5 pages • 2025
  • 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...
    (0)
  • $15.49
  • + learn more
Working with Data Structures: Stack main.cpp
  • Working with Data Structures: Stack main.cpp

  • Other • 1 pages • 2025
  • 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...
    (0)
  • $11.49
  • + learn more
Working with Data Structures: Stack Template Class
  • Working with Data Structures: Stack Template Class

  • Other • 1 pages • 2025
  • 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...
    (0)
  • $11.49
  • + learn more