CS201 Assignment No 2 Solution Fall 2019 | Virtual Study Solutions

Adsetra Ads

 

CS201 Assignment No 2 Fall 2019

Dear Students, Here you can read or download Introduction to Programming CS201 Assignment No 2 Solution of Semester Fall 2019. CS201 Assignment Due Date is 02 December 2019. Total Marks are 20. 
This assignment covers from Lecture no 11 to 15. CS201 Assignment Solution File + Sample Preview and Solution Video Explanation will be added soon. Previously we shared CS201 Assignment No 1 Solution Fall 2019.

CS201 Assignment No 2 Solution Fall 2019 - Introduction to Programming
CS201 Assignment No 2 Solution Fall 2019 - Introduction to Programming
Please Note:
We are here to facilitate your learning and we do not appreciate the idea of copying or replicating solutions. 

CS201 Assignment Instructions

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

  • Assignment is submitted after due date.
  • Submitted assignment does not open or file is corrupt.
  • Assignment is copied (From internet/students).
Also Read: CS201 VIVA Preparation Helping Material

Software allowed to develop CS201 Assignment

  • Dev C++
Recommended: DevC++ Installation and Usage Complete Guidelines

CS201 Assignment Objectives:

In this assignment, the students will learn:
  • How to fill / populate a two-dimensional array using random numbers.
  • How to write user defined functions and pass an array to them as parameter.
  • How to implement switch statement to process specific options.
  • How to compare elements of array.
  • How to find transpose of an array.
Also Read: CS201 Most Important Questions for VIVA

CS201 Assignment Submission Instructions

You are required to submit only .cpp file on the assignments interface of CS201 at VU-LMS.

Please Note:

Assignment submitted in any other format will not be accepted and will be graded zero marks.

CS201 Assignment Question:

An array of arrays is known as two-Dimensional array. In C++ it is also known as matrix. A matrix can be represented as a table of rows and columns. Like single dimensional arrays, we can store same type of data in it. Elements stored in array can be accessed using array index. Index starts from [0][0]. Means the index of row and column starts from 0. Following is an example of a two-dimensional array declaration and initialization having 3 rows and 3 columns.

int mularray[3][3] = {       //Declaration and initialization of a 2D Array

{1, 2, 3},

{5, 7, 9},

{0, 2, 4}

};

// The value of mularray [0][0] is 1

// The value of mularray [0][1] is 2

// The value of mularray [1][2] is 9

// The value of mularray [2][1] is 2

CS201 Assignment Problem Statement

Write an option-based program in C++ which should show following four options to the user at the start of application:
  1. Press 1 to populate a two-dimensional array with integers from 1 to 100.
  2. Press 2 to display the array elements.
  3. Press 3 to display the largest element present in the array along with its row and column index. 
  4.  Press 4 to find and show the transpose of the array

Instructions to write C++ program:

  1. Use random number function to populate the array i.e. rand( ). Range should be 1 to 100.
  2. Hint: use srand( ) function before rand( ) to seed the random number. In loop, rand( ) may generate same numbers so you should use srand(time(0)) before rand( ) to generate different random numbers. To use time(0) you may need to include time.h header file. 
  3. Switch statement will be implemented to perform multiple conditions and to perform different actions based on the conditions. i.e. Option 1, 2, 3 and 4.
  4. Write user defined functions to perform tasks given in options. Following function names should be used for consistency.
To populate the array
poulateArray( );
To display all elements of Array
showElements( );
To show largest element in the array
showLargestElement( );
To show transpose of the array
transposeArray( );

Screenshots for Guidance:

  • If the user chooses any option other than “1” at the start when the array is empty, the user should get a message like “Sorry the array is empty, first populate it by pressing 1 to perform this task ". See the following sample output:

CS201 assignment 2 fall 2019 output img 1

  • Upon pressing 1, a message like “Array has been populated successfully!" should be displayed. See the following sample output:

CS201 assignment 2 fall 2019 output img 2

  • Array elements should be displayed when the user presses 2. See the following screenshot for it:
CS201 assignment 2 fall 2019 output img 3
  • Largest number along with its row and column number can be found by pressing 3. Similarly, if the user presses 4 transpose of the array should be displayed. See the sample outputs for both options:

CS201 assignment 2 fall 2019 output img 4

  • Transpose of the array after pressing 4!
CS201 assignment 2 fall 2019 output img 5

CS201 Assignment No 2 Solution Fall 2019

You can see the Sample Preview of CS201 Assignment 2 Solution 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:

CS201 Past Papers Collection

Download  [  CS201 Mid Term Papers Solved by Moaaz 

CS201 Helping Material

CS201 Mid Term Past Papers Spring 2019

CS 201 solved midterm Past Papers Download 2015

CS201 Assignment 2 Solution Explanation Fall 2019

CS201 Assignment 2 Solution Code Working Output Preview

CS201 assignment 2 code Solution Output Preview in Online C++ Compiler
CS201 assignment 2 code Solution Output Preview in Online C++ Compiler
Please Note : 
You are required to Submit only .cpp file on the assignments interface of CS201 at VU-LMS.

Download CS201 Assignment No 2 Solution Fall 2019

File NameDownload Link
 CS201 Assignment No 2 Solution Fall 2019.docx Download
Please Share your feedback and suggestions in comments section. Thank You.

Post a Comment

 

Top