/* *copyright (c) 2016, *all Rights reserved, School of computer and Control engineering, Yantai University. * File name: Main.cpp *: Chang Heng * Completed: May 2, 2016 * version number: v1.0 * * Problem Description: First set up a point (dot) class, including data member X, y (coordinate point), implement the required member functions, gradually complete the design of each class, Find out the surface area, volume and output of the cylindrical cylinder and complete the required computational tasks: and design the main function to complete the test * Input Description: No * Output description: Output as required */#include <iostream> #include <cmath> Using namespace Std;class point{public: Point (double,double); void Juli (Point &p1,point&p2);p rivate: double x; Double y;}; Point::P oint (double m,double n) { x=m; Y=n;} void Point::juli (Point &p1,point&p2) { double s1,s2; s1= (p1.x-p2.x) * (p1.x-p2.x) + (P1.Y-P2.Y) * (P1.Y-P2.Y); S2=SQRT (S1); cout<< "The distance between two points is:" <<S2<<ENDL;} int main () { double x1,y1; Double x2,y2; cout<< "Please enter the coordinates of two points:" <<endl; cin>>x1>>y1>>x2>>y2; Point C1 (x1,y1); Point C2 (x2,y2); C1.juli (C1,C2);}
11th Week Project 1-point-circle-cylinder class family design 1 "