Skip to main content

Amazon D.E Student Offer

Click here for Getting Offer 

CS301 Assignment no 1 2020 solution with .cpp file

CS301 Assignment no 1 2020 solution with .cpp file

PROBLEM STATEMENT


You are required to write a program in C++ to implement Stack data structure and use this data structure to store different types of books based on their identity number. You have to implement Stack data structure using array. A stack is a LIFO structure in which data elements are stored in an order such that 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 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 book with unique numeric identity number. If book identity number will fully dividable by 8, will consider it software book. While the number fully dividable by 5 will consider it hardware book and consider rest of the books as other books.

First, the program will ask the user to input size of the stack. Then the programmer will ask the user to input total number of books. Then according to the number of Books, it will ask the user to enter identity number for each book. The book identity number can be any random number between 1 and 99. If book identity number is fully dividable by 8, we will consider it software book. While the number fully dividable by 5 will consider it hardware book and consider rest of the books as other books.

Programmer should implement isFull() function of the stack to check if the number of books exceed the size of the stack and isEmpty() function to check if the stack is empty or not. Programmer should also display the message “Books not found” if no books found.

SOLUTION


password is pakistanzindaabad CLICK HERE FOR CPP

Comments

Post a Comment

Popular posts from this blog

CS604 Assignment no 1 spring 2020

                                       CS604 ASSIGNMENT NO 1 WITH SOLUTION TOTAL MARKS 20 Instructions: Please read the following instructions carefully before submitting the assignment. It should be clear that your assignment will not get any credit if: §   The assignment is submitted after the due date. §   The submitted assignment does not open or file is corrupt. §   Assignment is copied (partial or full) from any source (websites, forums, students, etc.) Note: Lecture No. 1 to 6 are covered in this assignment. You have to upload only .doc file . Assignment in any other format (extension) will not be accepted and will be awarded with zero marks. Objective: The objective of this assignment is to provide hands on experience of: §   To learn and understand the basic concept of an Operating System §   To learn Directory ...

VU Whatsapp groups links.

VU Non-official Whatsapp Groups Links. Apnay apnay Subject k hissab say Groups join krlain shukria. or list update hoti rahay ge lehaza visit krtay raheay ga. Thanks in advance. STA301 Spring 2020 https://chat.whatsapp.com/E0xPQw3bhR2K0tjOMUs9Tv VU MCS MIT BSCS PKSR03 https://chat.whatsapp.com/EkOlJytsh479LvhK7aDIQR CS402 https://chat.whatsapp.com/JnENG2gNIzE2U4OxGDP9Po VU STUDY GROUP https://chat.whatsapp.com/Jj6VTD6Sv3x1kxAJLBUrNo MCQS PAST PAPERS https://chat.whatsapp.com/F2JNeDrbK025oT0xQZ0sU8 English can be FUN https://chat.whatsapp.com/Lrpzj6yOiSh6qFA2P41Uzp MCS https://chat.whatsapp.com/GzF8qvUOUT7K44rw1Fh0Mu EDU  https://chat.whatsapp.com/BoMTTkdPZiRDCCu0GtEO9m VU NEW STUDENTS https://chat.whatsapp.com/I2liS4ZIaVTBCDDw4CsZYD VU CS IT SE Study Group  https://chat.whatsapp.com/LHp256sWNbZLU63awqNfIr VU English Study Group  https://chat.whatsapp.com/FRQW5fWBcx6Fq9fHHROJXd VU Math Study Group  https://chat.whatsapp.com/HJIf6g84nrsGEEAQ0RBhC0 VU BBA MBA study Gro...

Amazon D.E Student Offer

Click here for Getting Offer