VU Vicky

CS301 Assignment 1 Solution Spring 2024 by VU Vicky

**Make changes before upload. I will not be responsible for your marks.**

Instructions

Please read the following instructions carefully before solving & submitting assignment:

It should be clear that your assignment will not get any credit (zero marks) if:

o         The assignment is submitted after the due date.

o         The submitted code does NOT compile.

o         The submitted assignment is other than .CPP file.

o         The submitted assignment does NOT open or file is corrupted.

o         The assignment is copied (from other student or ditto copy from handouts or internet).

Uploading instructions

For clarity and simplicity, you are required to Upload/Submit only ONE .cpp file.

Note: Use ONLY Dev-C++ IDE.

The objective of this assignment is

o    To make you familiar of Programming with List Data Structure .

For any query about the assignment, contact at [email protected]

You are required to implement a simple Shopping List Manager using ArrayList data structure. The program must meet the following requirements.

1.       Write a C++ program that allows users to manage a shopping list.

2.       Use ArrayList data structure to store items in the shopping list.

3.       Your program should contain the following functionalities.

a.        Add item to the shopping list.

b.       Remove items from the shopping list.

c.        View current items in the shopping list.

d.       Clear the shopping list (i.e. remove all items).

e.        Exit the program.

4.       The program should display a menu to the user and allow them to choose options using numbers.

5.       Ensure error handling for invalid inputs.

6.       Use Object oriented programing principles where applicable.

An output screenshot is given at the end of this file for your complete understanding and reference.

Download Your file

Note:   Don’t use ArrayList Built in library for assignment development. You must follow the following program structure for naming and to build the program. Otherwise, you will get ZERO marks.

Program Structure:

Class: ShoppingList

Attributes:

1.        Items[100] : string

2.        ItemCount: int

Explicit Default Constructor:

1.        ShoppingList()

1.        addItem(…)          //Where … represents function takes parameters.

2.        removeItem(…)   //Where … represents function takes parameters.

3.        viewList()

4.        clearList()

Default Function:

1.        main()

You might like

Post a comment.

Don't Forget To Join My FB Group VU Vicky THANK YOU :)

Contact Form

VU ANSWER

  • _ALL VU HANDOUTS
  • _VU PDF HANDOUTS
  • _VU PPT SLIDES
  • _HIGHLIGHTED PDF
  • _VU PROGRAMS
  • _VU SHORT NOTES
  • __Final Term
  • VU QUIZZES/MCQs
  • __ALL MIDTERM
  • VU PAST PAPERS
  • _ALL PAST PAPERS
  • _WAQAR SIDDU PAPERS
  • _MOAAZ PAPERS
  • VU SOLUTIONS
  • _ASSIGNMENTS FALL
  • _GDBs FALL 2022
  • CURRENT PAPERS
  • _VU PAPERS 2021
  • _VU PAPERS 2022
  • __Finalterm

CS301 Assignment 1 Solution 2021 - Data Structure Assignment

CS301 Assignment 1 Solution Spring 2021

Get to View CS301 Assignment 1 Solution 2021. Correct Data Structure CS301 Assignment 1 Solution Spring 2021 with Download Files.

Check Here Latest Assignment

CS301 Assignment 1 Solution FALL 2021

Provided by VU Answer.com

Objectives:

To enable students to understand code and practice the concepts of topic:

Linked list implementation

Efficient memory management 

Efficient use of pointer

Assignment Submission Instructions 

You have to submit only a .zip file which will have code ( .cpp) and screenshot image files on the assignments interface from your LMS account.

While testing your application and entering the record of the first student, use your VU ID for the name of the student. Take a screenshot of your input which should be showing your VU ID entered as the first student name. Zip your code (.cpp) and screenshot image files and submit zip file from your LMS account. 

ZIP, CPP, MSWORD, PDF Files Uploaded Below

ASSIGNMENT CODE:

#include <iostream>

#include<conio.h>

using namespace std;

class student

string name;

student *next_add;

class linked_list

student *head =NULL;

void menu();

int get_code();

// provided by vuanswer.com

string get_name();

string set_name(string n);

void insert();

void show_all();

void show_one();

void show_two();

void show_three();

void show_four();

string linked_list :: get_name()

cout<<"Enter the Name of Student: ";

cout<<" "<<endl;

cout<<"(Enter your student id according to assignment instruction)"<<endl;

cout<<""<<endl;

cin>>name;

return name;

int linked_list ::get_code()

// get free assignment solution correctly visit vuanswer.com

cout<<"      Course Name               Course Code    "<<endl;

cout<<"Introduction to Computing             1        "<<endl;

cout<<"Introduction to Programming           2        "<<endl;

cout<<"Data Structures                       3        "<<endl;

cout<<"Object Oriented Programming           4        "<<endl;

cout<<"Enter the Course Code: ";

cin>>code;

return code;

string linked_list ::set_name(string n)

// free to help whatsapp +923162965677 vuanswer.com

void linked_list :: insert(){

student *new_node = new student;

new_node -> name = get_name();

new_node ->code = get_code();

new_node -> next_add = NULL;

if(head==NULL)

head = new_node;

student *ptr = head;

while (ptr ->next_add != NULL)

ptr = ptr -> next_add;

ptr -> next_add = new_node;

cout<<"Student' s Information Saved Successfully. "; 

void linked_list ::menu()

int choice;

cout<<"0. Display All Students "<<endl;

cout<<"1. Display All Students Enrolled in Introduction to Computing"<<endl;

cout<<"2. Display All Students Enrolled in Introduction to Programming"<<endl;

cout<<"3. Display All Students Enrolled in Data Structure"<<endl;

// free to changing and new assignment whatsapp +923162965677

cout<<"4. Display All Students Enrolled in Object Oriented Programming"<<endl;

cout<<"5. Close the Program"<<endl;

cout<<"Select an Option for Required Operation: (VUAnswer.com)"<<endl;

cin>>choice;

    if(choice == 0){

        show_all();

        

    }

    else if(choice == 1){

        show_one();

    else if(choice == 2){

        show_two();

    else if(choice == 3){

        show_three();

    else if(choice == 4){

        show_four();

    else if(choice == 5){

       exit(0);

// switch(choice)

// show_all();

// show_one();

// show_two();

// show_three();

// show_four();

// exit(0);

goto starting;

void linked_list ::show_all()

int count =0;

cout<<"\n Following Student are Enrolled in All Courses."<<endl;

while (ptr != NULL)

cout<<"\n Student Name: "<<set_name(ptr ->name);

cout<<"\n Enrollment Count: "<<count;

void linked_list :: show_one()

cout<<"\n Following Student are Enrolled in Introduction to Computing."<<endl;

if(ptr -> code == 1){

// code by vuanswer.com

void linked_list :: show_two()

cout<<"\n Following Student are Enrolled in Introduction to Programming."<<endl;

if(ptr -> code == 2){

void linked_list :: show_three()

cout<<"\n Following Student are Enrolled in Data Structure."<<endl;

if(ptr -> code == 3){

void linked_list :: show_four()

cout<<"\n Following Student are Enrolled in Object Oriented Programming."<<endl;

if(ptr -> code == 4){

int main(){

linked_list obj;

char input;

obj.insert();

cout<<"\n Do you want to add another student? ";

cin>>input;

}while(input=='Y' || input == 'y');

obj.menu();

ASSIGNMENT RESULT

CS301 Assignment 1 Solution 2021

GET DOWNLOAD SOLUTION FILES CLICK

MSWORD FILE

MORE SOLUTIONS:

PHY101 GDB SOLUTION 2021

CS502 Assignment 1 Solution 2021

CS304 Assignment 1 Solution 2021

PLEASE NOTE:

Don't copy-paste the same answer.

Make sure you can make some changes to your solution file before submitting copy-paste solution will be marked zero.

If you found any mistake then correct yourself and inform me.

Before submitting an assignment check your assignment requirement file.

If you need some help and question about files and solutions.

MORE ANY ASSIGNMENTS SOLUTION FREE 

www.vuanswer.com

CS301 Assignment 1 Solution 2021

CS301 Assignment 1 Solution Spring 2021

Download CS301 Assignment 1 Solution 2021 File

Post a Comment

VU Handouts Updated - Virtual University All Subjects Handout

VU Handouts Updated - Virtual University All Subjects Handout

All VU Midterm Past Papers by Moaaz - VUAnswer.com

All VU Midterm Past Papers by Moaaz - VUAnswer.com

All VU Midterm MCQs Solved 2021 - Latest Solved Mega Files

All VU Midterm MCQs Solved 2021 - Latest Solved Mega Files

All VU Final Term Past Papers by Waqar Siddhu - VU Answers

All VU Final Term Past Papers by Waqar Siddhu - VU Answers

VU PPT Slides Handouts - Virtual University

VU PPT Slides Handouts - Virtual University

All VU Midterm Past Papers By Waqar Siddhu - Free Download

All VU Midterm Past Papers By Waqar Siddhu - Free Download

All VU Final Term Past Papers by Moaaz Solved - VU Answer

All VU Final Term Past Papers by Moaaz Solved - VU Answer

STA301 Midterm Solved Papers by Moaaz - VU Answer

STA301 Midterm Solved Papers by Moaaz - VU Answer

All VU Short Notes PDF | Free Download VU Notes | VUAnswer.com

All VU Short Notes PDF | Free Download VU Notes | VUAnswer.com

CS201 Final Term Solved Papers by Moaaz - VU Answer

CS201 Final Term Solved Papers by Moaaz - VU Answer

Menu footer widget.

  • Privacy Policy
  • Terms & Conditions

Copyright@ 2024 VUANSWER All Rights Reserved

Cyberian

Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode .

Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).

  • Cyberian Recent Activity
  • Virtual University
  • CS301 – Data Structures

CS301 Assignment 1 Solution and Discussion

zaasmi

Re: CS301 Assignment 1 Solution and Discussion

Semester Spring 2020 CS301- Data Structures Total Marks: 20

Due Date :1 June 2020 Instructions Please read the following instructions carefully before solving & submitting assignment: It should be clear that your assignment will not get any credit (zero marks) if: o The assignment is submitted after due date. o The submitted code does NOT compile. o The submitted assignment is other than .CPP file. o The submitted assignment does NOT open or file is corrupted. o The assignment is copied (from other student or ditto copy from handouts or internet). Uploading instructions For clarity and simplicity, You are required to Upload/Submit only ONE .CPP file.

Note: Use ONLY Dev-C++ IDE. Objective The objective of this assignment is

o To make you familiar of programming with stack data structure.

For any query about the assignment, contact at [email protected]

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.

Program’s sample output is given below

7722eec0-3d47-4dfa-8e49-af71bc5276df-image.png

Solution Guidelines:

  • First understand the code given in handouts about stack.
  • Get stack size from user to allocate space for stack dynamically.
  • Get identity number of books that user want to enter into the stack.
  • Get value one by one and push into stack.
  • Don’t allow popping if stack is empty and pushing if stack is full.
  • If identity number of book is dividable by 8 and 5 then priority should be given to 8. Lectures Covered: This assignment covers Lecture # 1-7. Deadline: Your assignment must be uploaded/submitted at or before, 1 June 2020

Discussion is right way to get Solution of the every assignment, Quiz and GDB. We are always here to discuss and Guideline, Please Don't visit Cyberian only for Solution. Cyberian Team always happy to facilitate to provide the idea solution. Please don't hesitate to contact us! NOTE: Don't copy or replicating idea solutions. Quiz Copy Solution Mid and Final Past Papers Live Chat

Eshaal Khan

Data Structures (CS301) Assignment # 01 Semester Fall 2020 Total Marks = 20 Deadline Date 26th Nov 2020

Please carefully read the following instructions before attempting assignment. RULES FOR MARKING It should be clear that your assignment would not get any credit if: • The assignment is submitted after the due date. • The submitted assignment does not open or file is corrupt. • Strict action will be taken if submitted solution is copied from any other student or from the internet.

• Lectures 1 to 7 are covered in this assignment NOTE No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least one day before its closing date. If you people find any mistake or confusion in assignment (Question statement), please consult with your instructor before the deadline. After the deadline no queries will be entertained in this regard. For any query, feel free to email at: [email protected]

Problem Statement: Suppose you are asked to make a Ranking information chart of students in a dynamic list called linked list using C++ language. The data will be stored in this list in order i.e. the highest marks student will be on top position with other information whereas the next highest marks student will be on second top position and so on. Your program will get the information of a student in the form of input (Student ID, Name, Marks) through console. After filling the required information, the student will be inserted in linked list at right place. The right place of student will be decided on the basis of marks. Furthermore, you are required to use only classes for this assignment. As we are not covering Struct in this course so using it in assignment solution is not allowed. Sample Output: See the gif file attached with this assignment file.

Note: DO REMEMBER that you must use your VUID as an input in this program.

Submission details Following Files Must be submitted in a single zip or rar file. • C++ code file (file name should be your VUID) • A .gif file which shows only “execution” of your Application (For Recording .gif a software named Screentogif is uploaded on LMS, or you can use any other gif recording tool as well) • First record must be with your own VU-ID in .gif file. If you do not submit any of the above-mentioned file or use some other VU-ID, you will be awarded Zero Marks.

@zareen 100% Solution Code

  • First post Last post Go to my next post

IMAGES

  1. CS301 Data Structure Assignment 1 Solution 2020

    cs301 data structures assignment 1 solution

  2. CS301 Assignment 1 with Solution File (Data Structures) Spring 2020

    cs301 data structures assignment 1 solution

  3. SOLUTION Assignment No. 1 (CS301

    cs301 data structures assignment 1 solution

  4. CS301 Data Structure Assignment #1 Solution & Codding

    cs301 data structures assignment 1 solution

  5. CS301 ASSIGNMENT NO. 1 FALL 2022 || 100% RIGHT SOLUTION || DATA STRUCTURES || BY VuTech

    cs301 data structures assignment 1 solution

  6. CS301 Assignment 1 Solution 2020 with Download File (Data Structure

    cs301 data structures assignment 1 solution

VIDEO

  1. Virtual University CS301 Data Structure Lecture 1 CS301 Short Lectures

  2. CS301 Assignment 1 Solution Spring 2021 || Data Structures || 100% Correct Solution

  3. CS301 Assignment 1 Solution Fall 2023 CS301 Assignment No 1 Fall 2023

  4. CS301 Data Structure Assignment No. 1 Solution by VU ACADEMY

  5. CS301 Assignment 1 Solution

  6. virtual University CS301 Data Structure Lecture 1

COMMENTS

  1. CS301 Assignment 1 Solution Spring 2021 || Data Structures

    Download File: https://www.vusolutionpoint.com Subscribe Channel For All Lectures Solved GDB, Quiz, Assignments Share Video for others students help Join Wha...

  2. Data Structures

    Studying Data Structures cs 301 at Virtual University of Pakistan? On Studocu you will find 57 lecture notes, 39 practice materials, 22 mandatory assignments and ... CS301 Assignment 1 Solution Spring 2021. 8 pages 2021/2022 77% (13) 2021/2022 77% (13) Save. CS301 Assignment 1 Solution Spring 2022. 16 pages 2021/2022 100% (1) 2021/2022 100% (1)

  3. CS301 Assignment 1 Solution Spring 2024 by VU Vicky

    The objective of this assignment is. o To make you familiar of Programming with List Data Structure. For any query about the assignment, contact at [email protected]. GOOD LUCK. You are required to implement a simple Shopping List Manager using ArrayList data structure. The program must meet the following requirements. 1.

  4. CS301 Assignment 1 Solution

    CS301 Assignment Solution Spring 2020 If U Found Any Mistake Then Correct Your Self Lab 1 Lab Title: Learn to implement linked list data structure Objectives: Get the knowledge of implementing linked list data structure using C++ programming language. Tool: Dev C++ Description: Write the C++ code to implement the List class.

  5. CS301 Assignment 1 Solution Spring 2022

    Data Structures. Mandatory assignments. 83% (12) 23. CS301- Midterm Solved MCQS WITH REF BY Moaaz. Data Structures. Other. 100% (19) 39. CS301 Midterm Solved MCQS By Junaid. ... CS301 ASSIGNMENT 1 SOLUTION SPRING 2022 Provide by VU Answer Due Date: 20 June 2022 Total Marks: 20 Assignment Submission Guideline:

  6. CS301 Data Structure Assignment No. 1 Solution by VU ACADEMY

    CS301 Data Structure Assignment No. 1 Solution by VU ACADEMYYou are required to write a program in C++ to implement Stack data structure and use this data st...

  7. CS301 Assignment 1 with Solution File (Data Structures ...

    My name is Shahbaz Ali.I am trying to spread knowledge all over the world. I thing knowledge is only weapon to the whole world. Knowledge plays very importan...

  8. PDF CS301 handouts.doc

    CS301 - Data Structures Lecture No. 01 _____ Page 3 of 505 Data Structures Lecture No. 01 Reading Material Data Structures and algorithm analysis in C++ Chapter. 3 3.1, 3.2, 3.2.1 ... constraints that a solution must meet. Suppose, the data is so huge i.e. in Gega bytes (GBs) while the disc space available with us is just 200 Mega bytes. This ...

  9. CS301 Assignment 1 Solution 2021

    Correct Data Structure CS301 Assignment 1 Solution Spring 2021 with Download Files. You have to submit only a .zip file which will have code (.cpp) and screenshot image files on the assignments interface from your LMS account. While testing your application and entering the record of the first student, use your VU ID for the name of the student.

  10. Spring 2023 CS301 1

    Assignment No. 1 Semester: Spring 2023 CS301 - Data Structures. Total Marks: 20 Due Date: 17th May, 2023. Instructions Please read the following instructions carefully before submitting the assignment solution: It should be clear that your assignment will not get any credit/marks if: o Assignment is submitted after due date.

  11. Spring 2023 Assignment 1 (CS301p)

    Spring 2023 Assignment 1 (CS301p) - Free download as Word Doc (.doc), PDF File (.pdf), Text File (.txt) or read online for free. This document provides instructions for Assignment 01 on data structures. It outlines requirements for implementing a linked list to track company inventory, including adding, removing, and updating products. Students must use a Node class to represent each product ...

  12. CS301 Data Structure Assignment #1 Solution & Codding

    This Video is only for Education purpose:-_____Easy Codding of cs301 assignmentQuery Comments me.You are required ...

  13. CS301P-Assignment No.1 Solution By M.junaid Qazi.pdf

    Document CS301P-Assignment No.1 Solution By M.junaid Qazi.pdf, Subject Computer Science, from Sir Adamjee Institute of Management Sciences, Length: 8 pages, Preview: CS301 P-Data Structures (Practicle) Assignment Solution # 01 Semester: SPRING 2023 Total marks = 20 Deadline th 17 of May 2023 Please

  14. CS301 Assignment 1 Solution and Discussion

    Assignment No. 01. Semester Spring 2020. CS301- Data Structures. Total Marks: 20. Due Date :1 June 2020. Instructions. Please read the following instructions carefully before solving & submitting assignment: It should be clear that your assignment will not get any credit (zero marks) if: o The assignment is submitted after due date.

  15. CS301 Data Structure Assignment 1 Solution 2020

    https://drive.google.com/file/d/1TlgKP4gr1VtsOZKRtXrAscALRo_izqhm/view?usp=sharing ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~Whatsapp For Paid Work Only +92 306...

  16. CS301 Assignment 1 Solution and Discussion

    Assignment No. 1. Semester: Spring 2021. CS301 - Data Structures Total Marks: 20. Due Date: 18/05/2021. Instructions. Please read the following instructions carefully before submitting the assignment solution: It should be clear that your assignment will not get any credit/marks if: o Assignment is submitted after due date.

  17. CS301 Assignment 1 Solution Spring 2021

    Download. University: University of the Punjab. Course:Data Structures. 8Documents. Students shared 8 documents in this course. Info More info. Download. On Studocu you find all the lecture notes, summaries and study guides you need to pass your exams with better grades.

  18. Fall 2021 CS301 1.doc

    Assignment No. 1 Semester: Fall 2021 CS301 - Data Structures Total Marks: 20 Due Date: 09/12/2021 Instructions Please read the following instructions carefully before submitting the assignment solution: It should be clear that your assignment will not get any credit/marks if: o Assignment is submitted after due date. o Submitted assignment does not open or file is corrupt.

  19. CS301 Assignment 1 Solution Spring 2023 CS301 Assignment No 1 ...

    Title:CS301 Assignment 1 Solution Spring 2023 CS301 Assignment No 1 Spring 2023Notice:If You Learn Any Subject (Holy Quran, C++, Python, Java, Data Structure...

  20. CS301 Assignment 1 Solution and Discussion

    wrote on. #1. Assignment No. 01. Semester Fall 2019. CS301- Data Structures Total Marks: 20. Due Date : 18-Nov-2019. Instructions. Please read the following instructions carefully before solving & submitting assignment: It should be clear that your assignment will not get any credit (zero marks) if:

  21. CS301 P Lab Exercises

    Cs301 assignment Solution#2.docx Pin2; CS401 Assignmen#2 Solution 2023 by Artist H25; CS301 GDB - New 2023 gdb 1; Cs301; Lab Manual CS301 New; Adil Nawaz Resume; ... Objectives: Get the knowledge of implementing stack data structure using linked list and array in C++ programming language. Tool: Dev C++ Description:

  22. CS301

    CS301 Data Structures Quiz 1 Solution 2021 Solved By VU NET with 100% Correct Solution You can get any Virtual University Solution Assignment Quizzes or GDB ...

  23. CS301 Assignment 2 Solution FALL 2023

    Fall 2021 CS301 1; CS301 Assignment 1 Solution Spring 2022; Cs 301 Assignment no 2 Fall 2021 solve by google; Preview text. ... Data Structures 100% (1) 16. CS301 Assignment 1 Solution Spring 2022. Data Structures 100% (1) 44. CS201 Final term solved MCQsby Moaaz. Data Structures 91% (45)