Question
C++ Write code for the following specification, making sure you use proper syntax, points will be deducted for syntax mistakes, therefore it is in your
C++
Write code for the following specification, making sure you use proper syntax, points will be deducted for syntax mistakes, therefore it is in your interest to write legibly.
Write
a class definition (i.e. header .h file) ,
a class implementation (i.e. source .cpp file) and
a main function (in a separate .cpp file).
You can assume you have a class Point already provided to you that you can include so use a line for example using #include Point.h
You can assume the Point object has a constructor that takes 2 doubles (for the x and y co-ordinates) and accessor and mutator functions getx() and gety() and setx(..) and sety(..)already implemented on the Point class that you can use. Therefore in order to create a point object you can invoke the Point class constructor as for example Point p1( 7.86, 8.786 );
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started