## Tuesday, 4 December 2018

### CS201-Intro to Programming Assignment no. 1 Solution FALL 2018 Due date: 05 December, 2018 | SUPERSTARWEBTECH

Subject: CS201-Intro to Programming
Semester: FALL 2018
Assignment No. 1
Due date: 05 December, 2018

 CS201 ASSIGNMENT 1 SOLUTION FALL 2018

CS201-Intro to Programming Assignment 1 #Instructions

DON’T miss these important instructions:

It should be clear that your assignment will not get any credit if:
§ The assignment is submitted after due date.
§ The assignment is submitted via email.
§ The assignment is copied from Internet or from any other student.
§ The submitted assignment does not open or file is corrupt.
§ It is in some format other than .cpp.

1) Note: You are supposed to submit your assignment in .cpp format. Any other formats like scan images, PDF, zip, doc, rar and bmp etc will not be accepted. All types of plagiarism are strictly prohibited.
For any query about the assignment, contact at CS201@vu.edu.pk

CS201-Intro to Programming Assignment 1 #Objective

To enable students to write, compile and execute a program in Dev C++. Moreover to familiarize students with the concepts of:

Loops
Switch, break, continue
Functions
Arrays
Pointers

CS201-Intro to Programming Assignment 1 #Questions

Write a program which defines three functions:
genRandNum()
findMinNum()
swapValue()

genRandNum(): This function will generate 5 random numbers in range 1-100 and store these numbers in array and print array on console.
Now start sorting these numbers in ascending order (lower to higher) by following the given steps:

1. findMinNum(): This function will search smallest number in unsorted part of array.
2. If leftmost number is the smallest number in unsorted array then no need to swap it otherwise swap the smallest number with left most unsorted number using swapValue() function. Now this number is fully sorted.
3. Repeat the above 2 steps until the whole array get sorted.

CS201-Intro to Programming Assignment 1 #Output Sample

Sample Output:

CS201-Intro to Programming Assignment 1 #Video with output

## Monday, 3 December 2018

### CS304-OOP Assignment no. 1 Solution FALL 2018 Due date: 07 December, 2018 | SUPERSTARWEBTECH

Subject: CS304-Object Oriented Programming
Semester: FALL 2018
Assignment No. 1
Due date: 07 December, 2018

 CS304-OOP ASSIGNMENT 1 SOLUTION FALL 2018

CS304-OOP Assignment 1 #Instructions

DON’T miss these important instructions:

It should be clear that your assignment will not get any credit if:
§ The assignment is submitted after due date.
§ The assignment is submitted via email.
§ The assignment is copied from Internet or from any other student.
§ The submitted assignment does not open or file is corrupt.
§ It is in some format other than .cpp.

1) Note: You are supposed to submit your assignment in .cpp format. Any other formats like scan images, PDF, zip, doc, rar and bmp etc will not be accepted. All types of plagiarism are strictly prohibited.
For any query about the assignment, contact at CS304@vu.edu.pk

CS304-OOP Assignment 1 #Objective

The objective of this assignment is:

o To give you the idea of practical implementation of some concepts like, definition of classes, Data members, member functions, Constructors, Aggregation and Composition etc.

For any query about the assignment, contact at cs304@vu.edu.pk

CS304-OOP Assignment 1 #Questions

Problem Statement:
We have the following part of class diagram showing aggregation relationship:

You are required to implement above class diagram (complete program) in C++ with all data members, constructors, member functions and concept (aggregation).
CS304-OOP Assignment #Output Sample

Note: You have to submit .CPP file. See the sample Output to view the messages you need to print in constructors of all classes.
Sample Output:

CS304-OOP Assignment 1 #Video with output