Summary of "CS301P Assignment 1 Solution Spring 2026 | CS301P Assignment 1 Solution 2026 | KST Learning"
Main ideas / concepts taught
The video is a step-by-step walkthrough to complete CS301P Assignment 1 (Spring 2026) using C++.
It includes guidance on:
- Setting up and creating a
.cppsource file in Dev-C++ - Writing a stack using a linked list
- Implementing stack operations and additional functions:
- Counting odd numbers
- Summing even numbers
- Writing a
main()function to demonstrate the required behavior and produce expected output - Compiling/running the program and submitting the correct
.cppfile to the LMS
Methodology / instructions
1) Assignment information and logistics
- The assignment is for CS301P Practical
- Due date: 1 May 2026
- Total marks: 20
- “Paid help” note mentioned:
- On the due date, fees double
- Booking numbers are limited because the LMS is down (as stated)
- Viewers are advised to contact before the due date
- Contact information is said to be in the video description (creator’s number and team numbers).
2) Prerequisites (tools)
- You need the Dev-C++ IDE (the video uses it)
- A link to a related Dev-C++ setup/install video is referenced in the description
- If Dev-C++ is not installed, download and install it.
3) Create and save the Dev-C++ file (.cpp)
- Open Dev-C++ (double-click the icon).
- You’ll see an empty window.
- Click:
- File → New → Source File
- Type some random text (to proceed with saving).
- Click Save:
- Choose Desktop as the save location
- Use your VUID as part of the filename (the video gives a generic example format)
- Save so you have a
.cppfile on the desktop. - Remove the random text.
- Paste your final code.
- Save again using Control + S.
4) Paste the complete C++ code
- The instructor copies the full code and pastes it into the new file.
- Viewers are instructed to:
- Write the code exactly as shown
- Be careful with syntax—even one semicolon error can break everything
- Pause the video while copying/writing
5) Structure of the code (what each part is for)
a) Node and linked-list basics
- Include for iostream is mentioned:
#include <iostream>(described in words)
- Use of
namespace stdis included. - A Node class is described:
- Represents an element in the linked structure
- Stores fields needed for the stack’s nodes
b) Stack class implemented using a linked list
- A stack class is created (described as a “Stack of the Number Stack class”).
- It uses a private pointer named
top:toppoints to the current top of the stack
- Constructor:
- Sets
topto null - Emphasis is placed on correct spelling/capitalization of
top
- Sets
c) Stack operations
push(value):- Adds a new value onto the stack (insert above the current top)
pop():- Removes a value from the stack (LIFO behavior implied)
display():- Displays the current stack values
6) Additional required computation functions
-
countOdds()(counting odd values):- Checks values in the stack
- Counts how many are odd
- Displays the count/result
-
sumEven()(summing even values):- Collects/sums the even values from the stack
- Displays/returns the result as “Sum of Even Numbers”
Note: The subtitles mention some confusion between “counting” vs “sum,” but the expected output shown includes “Sum of Even Numbers: 84.”
7) main() function logic (demonstration)
The video describes these steps:
- Display the student’s own VUID at the start of output
- Create a stack object, e.g.:
Stack s;
- Push the values into the stack:
9, 15, 21, 24, 26, 29, 34
- Display:
- Total odd numbers
- Sum of even numbers
- Call
pop()three times (LIFO order):- Removes
34, then29, then26
- Removes
- Display the remaining stack values again.
Note: The subtitles mention remaining values that include
19, while9was listed earlier—this suggests a mismatch likely due to subtitle/code inconsistencies.
- Finish with:
return 0;
8) Compile, run, and verify output
- The instructor compiles and runs the program and shows output.
- Output includes:
- Student VUID displayed
- Values pushed displayed (stack contents)
- Odd count displayed (example shows something like “four”)
- Sum of even numbers displayed (example shows 84)
- Remaining values displayed after 3 pops
- The results are confirmed as matching the assignment requirements (“as always told”).
9) Submission instructions (what file to submit)
- After compilation, you may see two files on Desktop.
- The important one is the
.cppfile containing your code. - Submit the
.cppfile to the LMS.
Speakers / sources featured
- KST Learning (implied as the video/channel source/brand)
- The main instructor/author (unnamed in the summary; mentions “my number” and “my team members” in the description)
Category
Educational
Share this summary
Is the summary off?
If you think the summary is inaccurate, you can reprocess it with the latest model.
Preparing reprocess...