CS301 Assignment No 1 Solution Fall 2017

News Saleb-,Newspapers are usually issued daily or weekly. CS301 Assignment No 1 Solution Fall 2017, Magazine News weekly, but they also had a magazine format. Newspapers with common interests usually publish news articles and articles about national and international news as well as local news. These include news events and personalities of the political, business and finance, crime, weather, and natural hazards; health and medicine, science, and computers and technology; Sports; and entertainment, community, food and cuisine, apparel and home fashion, and the arts.

A wide range of materials have been published in newspapers. In addition to news,CS301 Assignment No 1 Solution Fall 2017 ,information and opinions expressed above, including weather forecasts; Criticism and reviews Arts (including literature, film, television, theater, art, and architecture) and local services such as a restaurant; obituaries, notices of birth and graduation announcements; Entertainment features such as crossword puzzles, horoscopes, editorial cartoons, jokes, cartoons and comics; Advice column, food, and other columns; and a list of radio and television (program schedule). In the year 2017, newspapers can also provide information about new movies and TV shows available on streaming video services such as Netflix. The newspaper has been classified ad section in which people and businesses can buy a small ad to sell goods or services; In the year 2013, a large increase in internet sites to sell goods, such as Craigslist and eBay have caused ad sales are much less classified for newspapers.CS301 Assignment No 1 Solution Fall 2017 Since 1983, it has been known mainly because of its annual report and rankings that influence in college and grad school, lies in most fields and subjects. U.s. News World Report is and academic institution is the oldest and most famous in America, [5] and covering the areas of business, law, medicine, engineering, social sciences, education and public affairs, in addition to many other areas. Print Edition] has consistently included in the list of national bestsellers, coupled with online subscriptions. Additional rankings published by U.s. News World Report and includes hospitals,CS301 Assignment No 1 Solution Fall 2017, medical and specialty cars.
CS301 Assignment No 1 Solution Fall 2017-News of the United States was founded in 1933 by David Lawrence (1888-1973), which also started the World Report in 1946. The two magazines are covering national and international news separately, but Lawrence combines them into news reports of U.S. in World and 1948 [1] and Later sold the magazine to its employees. Historically, this magazine tends to be a bit more conservative than the two main competitors, Time and Newsweek, and focus more on the story of economic, health, and education. It's also distancing news, entertainment and sports celebrities. [2] an important milestone in the history of the beginning of the magazine is including the introduction of the "Washington Whispers" column in 1934 and the column "News You Can Use" in 1952. [3] [4] in 1958, the circulation of the weekly magazine passed one million and two million in 1973. (wikipedia) CS301 Assignment No 1 Solution Fall 2017

CS301 Assignment No 1 Fall 2017

Dear Students, CS301 Assignment Solution has been added. Here you can read or Download CS301 - Data Structures Assignment No 1 Solution and Discussion of Semester Fall 2017. Lectures covered in this assignment are Lecture 1 to 12. Assignment Due Date is 20 November, 2017. Total Marks are 20. We are here to facilitate your learning and we do not appreciate the idea of copying or replicating solutions. Previously we shared CS301 Mid Term Past Papers of Fall 2016.


CS301 Assignment No 1 Solution Fall 2017
CS301 Assignment No 1 Solution Fall 2017

CS301 Assignment Instructions

Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit (marks) if:

  • The assignment is submitted after due date.
  • The submitted code does NOT compile.
  • The submitted assignment file is not in .CPP format.
  • The submitted assignment file does not open or is corrupted.
  • The assignment is copied (from other student or ditto copy from handouts or internet).
Recommended : ECO401 Assignment No 1 Solution Fall 2017

    CS301 Assignment Uploading instructions

    For clarity and simplicity, You are required to Upload/Submit only ONE .CPP file which will contain solution of question.
    • Do not wait for grace day. Grace Day is given only if there is problem with LMS on due date. Submit your solution within due date. 
    • Note that no assignment will be accepted through email if there is any problem in LMS on grace day.
    Please Note: Use only dev-C++ IDE.

    Recommended : DevC++ Installation and Usage Complete Guidelines

    CS301 Assignment Objective

    The objective of this assignment is
    • To make you familiar with working of stack data structure and programming techniques to implement and understand the working of this data structure.

    CS301 Assignment Question:

    Write a C++ program to balance three (3) stacks so the sum of numbers in each stack should be same. [Marks 20]
    CS301 Assignment No 1 Question fall 2017
    CS301 Assignment No 1 Question 

    Your program should fulfill following requirements.

    1. Create three (3) stacks, initially each stack will have three same numbers. Number of each stack should be different from other stack numbers. You can see in above diagram that initially each stack have same number but number is different from the numbers in other stacks. 
    2. Your program should swap values between stack in the way that after balancing the stacks. Each stack should have different number as showing in above diagram. 
    3. Please note that user will enter numbers into stack, not X, Y and Z.
    4. User will enter a number for each stack which will be inserted 3 times in each stack.
    5. You can implement stack through array or link list. It is your choice. 
    Sample Output:
    Sample output screen shot of program is given below

    CS301 Assignment Solution Sample Required output
    CS301 Assignment Solution Sample Required output

    CS301 Assignment Solution Guidelines:


    • First understand the code given in handouts about stack. 
    • Don’t allow popping if stack is empty and pushing if stack is full.

      CS301 Assignment No 1 Solution Fall 2017

      You can see the sample Solution file page preview below. and You can easily Download CS301 Assignment Solution File from the Download Button given below:

      CS301 Assignment Solution Code

      #include <iostream> 
      using namespace std;

      class Stack
      {
      public:
      Stack()
      {
      size = 3; current = -1;
      } //constructor
      int pop()
      {
      return A[current--];
      } // The pop function
      void push(int x)
      {
      A[++current] = x;
      } // The push function
      int top()
      {
      return A[current];
      } // The top function
      int isEmpty()
      {
      return ( current == -1 );
      } // Will return true when stack is empty
      int isFull()
      {
      return ( current == size-1);
      } // Will return true when stack is full

      private:
      int object; // The data element
      int current; // Index of the array
      int size; // max size of the array
      int A[3]; // Array of 10 elements
      };
      //----------------------------------------------------------------------------------------

      Stack pushStack(int num);
      void popStack(Stack stack);

      //----------------------------------------------------------------------------------------

      // The main method
      int main()
      {
      int num;
      Stack stackFirst;
      Stack stackSec;
      Stack stackThird;

      int sFPop=0;
      int sSPop=0;
      int sTPop=0;


      //-----------------------------------------------------------------------------------------
      cout<< "Enter a number to push in stack 1: ";
      cin>> num;
      sFPop = num;
      stackFirst = pushStack(num);

      cout<< "Enter a number to push in stack 2: ";
      cin>> num;
      sSPop = num;
      stackSec = pushStack(num);

      cout<< "Enter a number to push in stack 3: ";
      cin>> num;
      sTPop = num;
      stackThird = pushStack(num);

      //-----------------------------------------------------------------------------------------

      // pop the elements at the stack
      cout << "\nStacks before Balancing... " ;

      cout << "\nStack 1 numbers: ";

      popStack(stackFirst);

      cout << "\nStack 2 numbers: ";

      popStack(stackSec);

      cout << "\nStack 3 numbers: ";

      popStack(stackThird);

      //-----------------------------------------------------------------------------------------


      stackFirst.pop();
      stackSec.pop();
      stackThird.pop();

      sFPop = stackFirst.pop();
      sSPop = stackSec.pop();
      sTPop = stackThird.pop();

      stackFirst.push(sSPop);
      stackFirst.push(sTPop);

      stackSec.push(sTPop);
      stackSec.push(sFPop);

      stackThird.push(sSPop);
      stackThird.push(sFPop);

      //-----------------------------------------------------------------------------------------

      // pop the elements at the stack
      cout << "\n\n\nStacks After Balancing... " ;

      cout << "\nStack 1 numbers: ";

      popStack(stackFirst);

      cout << "\nStack 2 numbers: ";

      popStack(stackSec);

      cout << "\nStack 3 numbers: ";

      popStack(stackThird);

      cout <<endl<<endl<<endl;
      system("pause");
      }

      //------------------------------------------------------------------------------------------
      Stack pushStack(int num){
      Stack stack;
      for(int i = 0; i <=2; i++)
      {
      if(!stack.isFull()) { // checking stack is full or not
      stack.push(num);
      }else
      cout <<"\n Stack is full, can't insert new element";
      }
      return stack;
      }
      //------------------------------------------------------------------------------------------
      void popStack(Stack stack){
      for (int i = 0; i <=2; i++)
      {
      if(!stack.isEmpty()) { // checking stack is empty or not
      cout << stack.pop()<<"\t";

      } else
      cout <<"\n Stack is empty, can't pop ";
      }

      }


      CS301 Solution Code output Sample Preview

      CS301 Solution Code output Sample Preview
      CS301 Solution Code output Sample Preview

      CS301 Assignment Solution Download Link

      Download

      If CS301 Assignment Solution provided by (Virtual Study Solutions) was helpful. Please Share it with your friends. You can also like our Facebook Page or Subscribe Us below for Updates. Thank You.

      Title :CS301 Assignment No 1 Solution Fall 2017
      Source :CS301 Assignment No 1 Solution Fall 2017

      News Info:


      Share on Facebook
      Share on Twitter
      Share on Google+

      Related : CS301 Assignment No 1 Solution Fall 2017

      0 komentar:

      Post a Comment