php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cs201 assignmentno 5 solution fall 2010 on 27/01/2011
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#21
Code:
#include<iostream.h> class multiply { private: int myarry[10]; public: //Constructor initializing array for all four objects of class! multiply() { for(int i=0;i<=9;i++) { myarry[i]=0; } } //returns values of objects a and b on the screen void getter(multiply a,multiply b) { cout<<"Values for object a are:-"<<endl; for(int t=0;t<=9;t++) { cout<<"Value"<<"."<<t<<"\t"<<a.myarry[t]<<endl; } cout<<"Values for object b are:-"<<endl; for(int s=0;s<=9;s++) { cout<<"Value"<<"."<<s<<"\t"<<b.myarry[s]<<endl; } } //takes values from user for objects a and b void setter(multiply x,multiply y,multiply z) { cout<<"Enter values in array for object a"<<endl; for(int m=0;m<=9;m++) { cout<<"Value Please?"<<endl; cin>>x.myarry[m]; } cout<<"Enter values in array for object b"<<endl; for(int n=0;n<=9;n++) { cout<<"Value Please?"<<endl; cin>>y.myarry[n]; } getter(x,y); calculate(x,y,z); } //performs the multiplication void calculate(multiply a,multiply b,multiply c) { for(int bee=0;bee<10;bee++) { c.myarry[bee]=a.myarry[bee]*b.myarry[bee]; } result(c); } //outputs result void result(multiply f) { cout<<"Your Result is"<<endl; for(int h=0;h<10;h++) { cout<<h<<"-"<<f.myarry[h]<<endl; } } }; void main() { multiply o,a,b,c; o.setter(a,b,c); }
Reply
#22
ye assignment miss na ho jaye yar
Reply
#23
i guess this one is the right one.
Reply
#24
I think he has slept.
Reply
#25
xpert ye CS201 assign. 5 ka solution hai
Reply
#26
Xpert Wrote:i guess this one is the right one.

u "guess"? yeah right there are 300+ people relying on you right now, feel the responsibility:p
Reply
#27
xpert ye us ka solution nahi hai
Reply
#28
Xpert Wrote:
Code:
#include<iostream.h> class multiply { private: int myarry[10]; public: //Constructor initializing array for all four objects of class! multiply() { for(int i=0;i<=9;i++) { myarry[i]=0; } } //returns values of objects a and b on the screen void getter(multiply a,multiply b) { cout<<"Values for object a are:-"<<endl; for(int t=0;t<=9;t++) { cout<<"Value"<<"."<<t<<"\t"<<a.myarry[t]<<endl; } cout<<"Values for object b are:-"<<endl; for(int s=0;s<=9;s++) { cout<<"Value"<<"."<<s<<"\t"<<b.myarry[s]<<endl; } } //takes values from user for objects a and b void setter(multiply x,multiply y,multiply z) { cout<<"Enter values in array for object a"<<endl; for(int m=0;m<=9;m++) { cout<<"Value Please?"<<endl; cin>>x.myarry[m]; } cout<<"Enter values in array for object b"<<endl; for(int n=0;n<=9;n++) { cout<<"Value Please?"<<endl; cin>>y.myarry[n]; } getter(x,y); calculate(x,y,z); } //performs the multiplication void calculate(multiply a,multiply b,multiply c) { for(int bee=0;bee<10;bee++) { c.myarry[bee]=a.myarry[bee]*b.myarry[bee]; } result(c); } //outputs result void result(multiply f) { cout<<"Your Result is"<<endl; for(int h=0;h<10;h++) { cout<<h<<"-"<<f.myarry[h]<<endl; } } }; void main() { multiply o,a,b,c; o.setter(a,b,c); }

this is solution of cs201 assignment # 5 spring 2010Smile
Reply
#29
Cs201 assignment 5 ka solution nahi hai XPERT bro.
Reply
#30
Assignment No. 5
Semester: Fall 2010
CS201: Introduction to Programming Total Marks: 20

Due Date: Jan 31st ,2011

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

 The assignment is submitted after due date.
 The submitted assignment does not open or file is corrupt.

All types of plagiarism are strictly prohibited.

Note: You have to upload only .cpp file. Assignment in any other format (extension) will not be accepted. If you will submit code any other file format like .doc or .txt etc. you will get zero marks.

Objective
The objective of this assignment is to provide hands on experience of using

 User defined manipulators
 Static member
 Copy Constructor

Guidelines
 Code should be properly aligned and well commented.
 Follow C/C++ rules while writing variables names, function names etc.
 Use only Dev-C++ IDE for this assignment.
Assignment

Problem Statement:

• You are required to write a program of class rectangle named CRectangle which should draw two rectangles by using iTop, iRight, iBot, and iLeft. Then program should calculate the area of both. Number of rectangles should be displayed to user by using static variable counter which would keep track of increment or decrement of rectangles. Dynamically Create another rectangle by using copy constructor and increment in counter should be displayed on screen. Decrement in static variable counter (after de-allocating memory which was dynamically allocated) should be displayed again on screen.

Sample Output
Area of rectangle 1 is 6400
Area of rectangle 2 is 5600
The number of rectangles is 2
After using copy constructor, total number of rectangles is 3
The number of rectangles is 2


Detailed Description:

1. The class should have 4 members: iTop, iRight, iBot, and iLeft, all of type int.
2. Area of both rectangles should be calculated by using iTop, iRight, iBot, and iLeft.
3. It should have a default constructor and a copy constructor.
4. It should have a destructor.
5. It should contain all required getters and setters.
6. It should contain a static member, iRefCount, which keeps track of the number of CRectangle objects. Increment it in the constructor, and decrement it in the destructor.


Hint:
CRectangle would implement rectangles by using left, right, top and bottom and calculate their areas to compare.


GOOD LUCK

Deadline:
Your Assignment solution must be submitted on or before Jan 31st, 2011.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  CS703 – Advanced Operating Systems Assignment No.3 solution January 2016 Vuhelper 0 5,967 01-23-2016, 09:58 PM
Last Post: Vuhelper
  CS601 Data Communication Assignment No. 03 Solution 23rd January 2016 Vuhelper 1 2,000 01-23-2016, 06:09 PM
Last Post: Vuhelper
  CS403 Assignment No. 03 Solution 23rd January 2016 Vuhelper 2 1,243 01-23-2016, 03:18 PM
Last Post: Vuhelper
  CS506 Web Design and Development Assignment no 3 Solution 3rd January 2016 Vuhelper 0 2,305 01-23-2016, 03:16 PM
Last Post: Vuhelper
  CS724 Software Process Improvement Assignment No 01 Solution 20th January 2016 Vuhelper 0 2,033 01-20-2016, 06:26 PM
Last Post: Vuhelper
  CS711 Software Design Assignment No 01 Solution Due Date Feb 12, 2016 Vuhelper 0 1,724 01-20-2016, 06:24 PM
Last Post: Vuhelper
  CS709 Formal Methods for Software Engineering Assignment No 01 Solution January 2016 Vuhelper 0 1,860 01-20-2016, 06:22 PM
Last Post: Vuhelper
  cs703 assignment no 3 Solution 20th January 2016 Vuhelper 0 1,762 01-20-2016, 06:20 PM
Last Post: Vuhelper
  CS704 Assignment No. 01 Solution January 2016 Vuhelper 0 4,861 01-20-2016, 06:19 PM
Last Post: Vuhelper
  Data Warehousing– CS614 Assignment No. 3 solution 20th Jauary 2016 Vuhelper 0 9,629 01-20-2016, 06:16 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 3 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support