CS301 Assignment No 1 Spring 2020
Dear Students, Here you can read or download CS301 - Data Structures Assignment 1 Solution and discussion of Semester Spring 2020. The Assignment Due Date is 1 June 2020. Total Marks are 20. CS301 Assignment 1 Solution 2020 [Solution File with Sample Preview and explanation video] has also been added below. Previously we shared CS614 Assignment No 1 Solution Spring 2020.
CS301 Assignment No 1 Solution and discussion Spring 2020 |
CS301 Assignment Instructions:
Please read the following instructions carefully before solving & submitting an assignment:- It should be clear that your assignment will not get any credit (zero marks) if:
- The assignment is submitted after the due date.
- The submitted code does NOT compile.
- The submitted assignment is other than.CPP file.
- The submitted assignment does NOT open or file is corrupted.
- The assignment is copied (from other students or ditto copy from handouts or internet).
CS301 Assignment Uploading instructions:
For clarity and simplicity, You are required to Upload/Submit only ONE.CPP file.
Please Note: Use ONLY Dev-C++ IDE.
Recommended: DevC++ Installation and Usage Complete Guidelines
CS610 Assignment No 1 Solution Spring 2020
Share your valuable feedback in the comments section. Thank You.
CS301 Assignment Objective:
The objective of this assignment is:- To make you familiar with programming with a stack data structure.
CS301 Assignment Question:
You are required to write a program in C++ to implement a Stack data structure and use this data structure to store different types of books based on their identity number. You have to implement a Stack data structure using an array. A stack is a LIFO structure in which data elements are stored in an order such that the last element pushed on the stack will be popped up first.
Your program should cover the following scenario.
Suppose a student is collecting books and throwing them into a stack of books. You need to develop an application that will count different books in the stack. This stack will consist of three types of books i.e. software, hardware, and other books.
You will identify a book with a unique numeric identity number. If book identity number will fully dividable by 8, will consider it a software book. While the number fully dividable by 5 will consider it hardware book and consider the rest of the books like other books.
First, the program will ask the user to input the size of the stack. Then the programmer will ask the user to input the total number of books. Then according to the number of Books, it will ask the user to enter the identification number for each book. The book identity number can be any random number between 1 and 99. If the book identity number is fully dividable by 8, we will consider it a software book. While the number fully dividable by 5 will consider its hardware book and consider the rest of the books like other books.
The programmer should implement the isFull() function of the stack to check if the number of books exceeds the size of the stack and isEmpty() function to check if the stack is empty or not. The programmer should also display the message “Books not found” if no books found.
CS301 Assignment Solution Guidelines:
- First, understand the code given in handouts about the stack.
- Get stack size from the user to allocate space for stack dynamically.
- Get an identity number of books that users want to enter into the stack.
- Get value one by one and push into the stack.
- Don’t allow popping if the stack is empty and pushing if the stack is full.
- If the identification number of the book is dividable by 8 and 5 then the priority should be given to 8.
CS301 Assignment 1 Solution Spring 2020
You can see the Sample Preview of CS301 Assignment 1 Solution 2020 provided by (Virtual Study Solutions) below. Click on Download Button to Download Solution File in Your PC. Please Share it with your friends. You can also like our Facebook Page or Subscribe Us on YouTube for Latest Updates related to Assignment Solution and Past Papers.
We also recommend you to read:CS202 Assignment No 1 Solution Spring 2020
CS610 Assignment No 1 Solution Spring 2020
All Subjects Mid Term Past Papers Collection
File Name | Download Link |
---|---|
All Subjects Mid Term Papers Collection.zip | Download |
Please Note:
We are here to facilitate your learning and we do not appreciate the idea of copying or replicating solutions.
Recommended: How to avoid Plagiarism or Zero Marks in Assignments
Download CS301 Assignment 1 Solution Spring 2020
File Name | Download Link |
---|---|
CS301 Assignment 1 Solution Spring 2020.docx | Download |
Share your valuable feedback in the comments section. Thank You.
sir cs504 ki assignment be upload kr dyn
ReplyDeletesir cs504 ki assignment be uploadkr dyn
ReplyDelete