Please read the following instructions carefully before submitting 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.
§ Assignment is copied(partial or full) from any source (websites, forums, students, etc)
Note: You have to upload only .cpp file. Assignment in any other format (extension) will not be accepted and will be awarded with zero marks. For example, if you submit code in .doc (Word document) or .txt files, no reward will be given in any case.
The objective of this assignment is to provide hands on experience of:
§ Objects and Classes
§ Constructors and Destructors in classes
§ Setters and Getters in classes
§ Use of friend functions
§ Operator overloading
§ Code should be properly indented and well commented.
§ Follow C/C++ rules while writing variable names, function names etc
§ Use only dev-C++ for this assignment.
Problem Statement: You are required to write a program for calculating area of Trapezoid. Formula for calculating area of trapezoid is
Where a and b are two bases of trapezoid and h corresponds to height.
+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)
+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)+ Click Here to Search (Looking For something at vustudents.ning.com?) + Click Here To Join (Our facebook study Group)
Location(int lon,int lat);
Location operator ++();
Location operator --();
void* operator new (size_t size);
void operator delete( void * ptr );
Location::Location(int lon,int lat)
coutendl"Longitude : "l1endl;
cout"Latitude : "l2endlendl;
void* Location::operator new(size_t size)
cout"Overloaded new operator called....." endl;
void * rtn = malloc (size ) ;
Location Location::operator ++()
Location Location::operator --()
void Location :: operator delete( void *memory )
cout"Overload delete operator called....."endlendl;
free( memory );
Location l1(10,20), *l2= new Location(30,40);
coutendl"Coordinates for Location 1:";
cout"After applying overloaded ++ operator on Location 1 : ";
cout"Coordinates for Location 2:";
cout"After applying overloaded -- operator on Location 2 : ";
ye to compile hi nhi ho rhi is me to err hai jnab
ye compile hona b nahi hai.. q k ye relevent asnwer hai he nahi..
itx nt my solution
teel the correct program
ye solution C++ mai kis tara likaingai
ye file c++ mai kis tara hoga convert ka tarika batai
Tell to your Friends..
thnks koi error nehi is main
error hain is main b