Question
V. Programming (20 ) 1. According to the definition of class linked list shown above, please: l Overload operator l Please define a member function
V. Programming (20)
1. According to the definition of class linked list shown above, please:
l Overload operator
l Please define a member function to remove a specific node from a linked list. (6)
l Write main function to test the definition, you may add any other member functions if they are needed. (2)
2. Given base class:
class Point{
double x,y;
public:
Point(double xx=0,double yy=0);
};
l Please complete the definition Point;(2)
l Please complete the definition of its derived class Line, you may add other member functions. (5)
class Line:public Point{
Point a;
public:
Line(double x1,double x2,double y1,double y2);
double length();
void display()
};
l Define main function to test the definition. (2)
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