CS301 Assignment Solution Spring 2020 | VU Assignments Solution


CS301 Assignment Solution Spring 2020 | VU Assignments 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

Tool: Dev C++
Description:
Write the C++ code to implement the List class. You need to write only add( ). remove( ), and find( ) functions of the list class.

SOlution of this assignment is following code you just put this code in the dev c+ and save that file.
class Node {

               
                private:
                                // Data part and pointer part of a node
        int number;
        Node *nextNode;

    public:
                //To get and set data of node
        int get() {return number;};
        void set(int number) {this->number = number;};

        //To get address of next node in the linked list
        Node *getNext() {return nextNode;};
        void setNext(Node *nextNode){this->nextNode = nextNode;};     
};


list.cpp file:
#include "Node.cpp"

class List{
               
    private:
        int size;
        Node* headNode;
        Node* currentNode;
        Node* lastCurrentNode;

    public:
List(){
headNode = new Node();
headNode->setNext(NULL);
currentNode = NULL;  
lastCurrentNode = NULL ;
               size = 0;
        }

        void add(int addNumber){
            Node *newNode = new Node();
newNode->set(addNumber);

            if (currentNode != NULL){
newNode->setNext(currentNode->getNext());
currentNode->setNext(newNode);
lastCurrentNode = currentNode;
currentNode = newNode;
            }
else{
newNode->setNext(NULL);
headNode->setNext(newNode);
lastCurrentNode = headNode ;
currentNode = newNode ;
            }
               size ++ ;
        }

        void remove(){
                //store locations of cur and lastcur pointers
                Node *tempCurNode = currentNode;
                Node *templstCurNode = lastCurrentNode;
               
                //Move pointers to start of the list
                currentNode = headNode->getNext();
                lastCurrentNode = headNode;
               
            if (currentNode != NULL &&currentNode != headNode){
                lastCurrentNode->setNext(currentNode->getNext());
                delete currentNode;
                size--;
                                                }
                                               
                                                //Re-assign the positions again to current node and lastcurrentnode
                                                currentNode = tempCurNode;
                                                lastCurrentNode = templstCurNode;
               
        }

        void find(List list, int x){
                                               
                                                Node* savedCurrentNode = list.currentNode;
                                                list.currentNode = list.headNode;
                                                int f = 0 ;
                                               
                                                while( list.next()){
                                                                if (x == list.get()){
                                                                                cout<<"\n Element " << x << " is found \n" ;
                                                                                f = 1 ;
                                                                }
                                                }
                                                if (f !=1)
                                                                cout<< "\nElement is not found in the list\n";
                                                               
                                                list.currentNode = savedCurrentNode;
                                }

        bool next(){
            if (currentNode==NULL) return false;

lastCurrentNode = currentNode;
currentNode = currentNode->getNext();
            if (currentNode==NULL || size==0)
            return false;

            else
                return true;
        }

        int get(){
            if (currentNode != NULL)
            return currentNode->get();
        }

        void start() {
                lastCurrentNode = headNode;
                currentNode = headNode;
                                }      

};

link_list.cpp:
#include<iostream>
using namespace std;
#include "list.cpp"
main(){

               
                //Created a list object.
                List list;
                int x ;

                //Adding values to the list
                cout<< "Added numbers to the list: \n";
                list.add(5);
                list.add(13);
                list.add(4);
                list.add(8);
                list.add(24);
                list.add(48);
                list.add(12);
               
                //Calling the start method of the list
                list.start();
                //Printing all the element of the list
                while(list.next())
                                cout<<"List Element:"<<list.get()<<endl;
                cout<<"_____________________\n";
               
                cout<< "Removed First three elements from the list after that\n";          
                list.remove();
                list.remove();
                list.remove();
                list.start();
                while(list.next())
                                cout<<"List Element:"<<list.get()<<endl;
                cout<<"_____________________\n";
               
                cout<< "Enter the number to be searched: " ;
                cin>>x ;
                list.start();
                list.find(list, x );
                system("pause");
}

Output images are:


CS301 Assignment Solution Spring 2020 | VU Assignments Solution

















VU Assignment CS601 For Data Communication | Spring 2020 | VU-LMS

VU Assignment CS601 For Data Communication | Spring 2020 VU-LMS



Scenario:

Suppose Prime Ministers (PMs) of two countries (ABC and XYZ) are holding an important meeting through video conferencing. The native languages of both countries are different; however, both the PMs have agreed upon to use English language for discussion. There are two meeting Halls (Hall-1 and Hall-2) in PM house of ABC country, both having different computer networks. Hall-1 has a computer network of 18 computers where each computer is directly connected to other computer in the network whereas Hall-2 has 8 computers connected with each other through a self-deciding central device to forward data only to intended destination, and the same hall has been used for the meeting of the PMs. Both the halls are connected with each other through an intermediary networking device. Meeting is being held in a smooth flow where each PM can listen and speak to each other at the same time.
After carefully reading the above scenario, give the answer of each of the question given in the following table:
S. No.
Question
Answer
1
Which type of topology is used in the Hall-1? Mesh Topology

2
What is total number of links required in the identified topology for the Hall-1?
 N(N-1)/2
18(18-1)/2
18(17)/2
306/2=
153

3
What is total number of ports being used in the identified topology in the Hall-1?
n-1
18-1=17

4
What computer topology is being used in the Hall-2?star topology

5
Identify the connecting device that is being used in the identified topology for the Hall-2?  central hub

6
Which category (geographical wise) of network exists is in Hall-1? LAN

7
Which category (geographical wise) of network exists is in Hall-2? LAN

8
Identify the type of network being created when the networks of both countries are connected with each other for meetings of PMs.

 WAN

9
Identify the communication mode which is enabling both the PMs to listen and speak to each other at the same time?
Full Duplex Transmission

10
Which layer’s device will be used to connect the networks of both countries for video conferencing?

Physical Layers



Best of Luck!


VU Assignment CS601 For Data Communication | Spring 2020 VU-LMS

Normal Distribution Calculation | Statistics | Part 4 | Online School

Normal Distribution Calculation | Statistics | Part 4 | Online School

This video is the last part of first chapter normal distribution of 2nd year which elaborates the 2nd or last topic of the chapter of statistics part. Like and subscribe our channel for more videos (if you like).
https://www.facebook.com/iTianz8218

https://www.facebook.com/Technical.iTianz

https://twitter.com/Technicalitianz

Instagram https://www.instagram.com/shahrukh062 #education #onlineschool #statistics

education onlineschool statistics

Earn 6000 a Day via Olymp Trade | Earn Money Online

Earn 6000 a Day via Olymp Trade | Earn Money Online

This video is just to avoid a scam of multiple companies like this Olympic Trades! And Like and subscribe to our channel for more videos (if you like).

https://www.facebook.com/iTianz8218 Facebook https://www.facebook.com/Technical.iT... Twitter https://twitter.com/Technicalitianz Instagram https://www.instagram.com/shahrukh062 #education #onlineschool #statistics

education onlineschool statistics


Normal Distribution Calculation | Statistics | Part 2 | Online School

Normal Distribution Calculation | Statistics | Part 2 | Online School


In this video, you can learn the solution that how to find an area in normal distribution which is the first chapter of statistics part 2! Like and subscribe to our channel for more videos (if you like). 

https://www.facebook.com/iTianz8218 Facebook https://www.facebook.com/Technical.iT... Twitter https://twitter.com/Technicalitianz Instagram https://www.instagram.com/shahrukh062 #education #onlineschool #statistics

education onlineschool statistics

Normal Distribution Calculation | Statistics | Part 5 | Online School

Normal Distribution Calculation | Statistics | Part 5 | Online School

In this video, you can learn the solution that how to find an area in the normal distribution of percentile values which is in the first chapter of 2nd-year statistics!!! Like and subscribe to our channel for more videos (if you like). Facebook Group https://www.facebook.com/iTianz8218 Facebook https://www.facebook.com/Technical.iT... Twitter https://twitter.com/Technicalitianz Instagram https://www.instagram.com/shahrukh062 #education #onlineschool #statistics

education onlineschool statistics

Top 5 Best Search Engines That Do Not Track You!

Top 5 Best Search Engines That Do Not Track You!

In this video, I will show you the Top 5 search engines that do not store your search queries or track you while you’re online.The following are the links of these search engines...
Yippy
  http://yippy.com/ Swisscows https://swisscows.com/ DuckDuckGo https://duckduckgo.com StartPage https://www.startpage.com/ Search Encrypt https://www.searchencrypt.com/ if you like our video then like this video and subscribe our channel for further new videos.Here are the links of our social platform sites. Subscribe https://www.youtube.com/channel/UC0k6... Facebook https://www.facebook.com/iTianz8218/ Instagram Profile https://www.instagram.com/shahrukh062/ #GoogleAlternative2020 #SearchEngine #Tracking

$2500+ Free SEO Course | SEO Academy | Online Academy

$2500+ Free SEO Course | SEO Academy | Online Academy

In this video, I am going to show you, $200+ SEO Course Bilkul Free Jaldi Karo | Free SEO (Online School) Academy IF this course promo code is expired and you want the full course of MOZ Academy then you can comment i`ll give you free of cost by sharing a GDrive link.

Promo code: wegotthis Don't Forget to SUBSCRIBE, Like, Comment and Share this Video.

How to Find and Remove Spyware,Trojans and Viruses | Manually Removing Viruses

How to Find and Remove Spyware, Trojans, and Viruses | Manually Removing Viruses

How to Find and Remove Spyware, Trojans, and Viruses.

In this video, we show you how to get rid of Computer/PC common Viruses/Virus by manually. if your antivirus is not doing well, then you can follow this method and find the dll , unknown, un-named file and kill it manually. This way you can easily remove the pc virus in windows 10| windows 7| Windows vista.

Virus
Windows 10
Security

How to Find and Remove Spyware, Trojans, and Viruses | Manually Removing Viruses


Cleaning Pasting and Assembling PS3 | Playstation 3 | Sony | PS3 | Ps3 Console

Cleaning Pasting and Assembling PS3 | Playstation 3 | Sony | PS3 | Ps3 Console



This video is about to clean the ps3 console, pasting thermal paste, and at last assembling the ps3 console body.PS3 is the best model of sony corporation and in 2020 it is hackable/jailbreak-able so you can play more games on this ps3 machine.


Cleaning Pasting and Assembling PS3 | Playstation 3 | Sony | PS3 | Ps3 Console


sss

Normal Distribution Calculation | Statistics | Part 4 | Online School



Normal Distribution Calculation | Statistics | Part 4 | Online School


Normal Distribution Calculation | Statistics | Part 4 | Online School

This video is the last part of the first chapter normal distribution of 2nd year which elaborates on the 2nd or last topic of the chapter of the statistics part. Like and subscribe to our channel for more videos (if you like).

Events Handling & Delegates | Visual Basic | Java | C++ Programming | Hindi/Urdu

Events Handling & Delegates | Visual Basic | Java | C++ Programming | Hindi/Urdu

Events Handling & Delegates | Visual Basic | ASP MVC | C++ Programming Dear friends, here u find a complete ethical hacking course for your organization's security. Remember it is just for knowledge and security purposes, also more knowledge about different fields of programming, and educational videos for Students.

Events Handling & Delegates | Visual Basic | Java | C++ Programming | Hindi/Urdu


On Destroying Book | Important Q&A | English | FSC 2nd Year Book 2 | Notes | Online Academy

On Destroying Book | Important Q&A | English | FSC 2nd Year Book 2 | Notes | Online Academy


On Destroying Book | Important Q&A | English | FSC 2nd Year Book 2 | Notes | Online Academy

In this video, we are going to share some notes OR documentation of important short questions of English 2ndyear which will help in your final board exams.









On Destroying Book | Important Q&A | English | FSC 2nd Year Book 2 | Notes | Online Academy

End Of Term | Important Q&A | English | FSC 2nd Year Book 2 | Notes | Online Academy

End Of Term | Important Q&A | English | FSC 2nd Year Book 2 | Notes | Online Academy



End Of Term | Important Q&A | English | FSC 2nd Year Book 2 | Notes | Online Academy

In this video, we are going to share some notes OR documentation of important short questions of English 2ndyear which will help in your final board exams.










End Of Term | Important Q&A | English | FSC 2nd Year Book 2 | Notes | Online Academy


Whatsapp is Permanently Banned?

Whatsapp is Permanently Banned?

In this article, we are going to share with you some important news that Whatsapp is permanently banned in some regions of the world which are listed below.

WhatsApp is permanently banned in the following countries by direct order of government:
1.       China
2.       Cuba
3.       Iran
4.       North Korea
5.       Syria
  6.    United Arab Emirates (UAE)

China:
           The Chinese government blocks the Whatsapp from 2017 to till now, due to its strong encryption features which limit the country’s power to control the contents it’s citizens are exposed to, particularly during political periods.

Cuba: Cuba is also in the list of countries that restrict the usages of the WhatsApp app. The Cuban government didn’t ban WhatsApp in the region for political or security reasons, or as a way to keep a tab on its citizen's communications.


Iran: Iranian government also blocks access to WhatsApp. Nobody knows Why the government blocks the usage but several sources have reported the censorship to be attributed to politics and security.


North Korea: North Korea is also in the list of countries that restrict the usages of the WhatsApp app. The North Korean government is also blocked Facebook, Twitter, etc social media platforms for their security purposes.


Syria: The Syrian government also blocks access to WhatsApp due to end-to-end encryption of WhatsApp that can be utilized by state enemies to plot against the government; hence the ban.

United Arab Emirates (UAE):  UAE government placed a ban on WhatsApp in order to promote the use of local telecommunication services based in the country and which ultimately increase the country’s revenue.


Whatsapp is Permanently Banned?