This is my Line2D.h #include <iostream> #include <fstream> #include <string> #include <sstream> #include <vector> #include <cstdlib> #include <cmath> #include <algorithm> #include "Point2D.h" using namespace std; class Line2D { private: Point2D pt1; Point2D pt2; protected: double length; // Set function void setLength(); public: // Constructor Line2D(); Line2D(Point2D pt1, Point2D pt2); // Get functions Point2D getPt1(); Point2D getPt2(); double getScalarValue(); // Set functions void setPt1(Point2D pt1); void setPt2(Point2D pt2); // Other functions void printLine2D(); bool operator==(const Line2D& otherL2D) const; }; This is my Point2D.h, #ifndef POINT2D_H #define POINT2D_H #include <iostream> #include <fstream> #include <string> #include <sstream> #include <vector> #include <cstdlib> #include <cmath> …

Member Avatar
Member Avatar
+0 forum 1

I've been debating where to put this. Maybe the Community Center. Feel free to move if necessary. I'm sticking it in Software Development because it has to deal with Software Development, but it's more of a general topic involving different levels of expertise and familiarity, what one's "lane" is, and dealing with people diplomatically. I'm currently trying to soothe over some hurt feelings and trying to solve some issues purportedly involving computer expertise, but I think it really has to do with something deeper, ie human dignity. The specifics aren't too important, but I and some other programmer types taught …

Member Avatar
Member Avatar
+0 forum 2

How to break security when you implement encapulation in java programing?

Member Avatar
Member Avatar
+0 forum 1

This snippet is easy: it defines an immutable wrapper around a sequence type (list, deque, etc) which allows a class, function or module to expose a read only version of a sequence to the outer world. A constant wrapper around mapping types could also be defined in a similar manner.

Member Avatar
Member Avatar
+2 forum 4

Basically this program uses an abstract class which 3 other classes extends to so that in the end an overridden toString() method will print out how many pages must be read for each class. Okay, well this program is for a class, but I am kinda of stuck because my teacher wants me to test the Homework methods below with ArrayList, but I cannot reference is from a static context.My teacher wasn't specific about the tester. All he said was to use Arraylist to test the classes. So I assume it was 4 different arraylist because there is 4 different …

Member Avatar
Member Avatar
+0 forum 3

this is the summary of program and i only include the addition of matrices my problem would be the variables in Addition class cannot read variables from the other class i need to know how to fix that the error would be : The name 'a' does not exist in the current context The name 'b' does not exist in the current context that is why i cant sum the array to give the result help! thanks in advance *****Program.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace matrix { class Program { static void Main(string[] args) { matrix.TypeOfMatrix.TypeSel(); …

Member Avatar
Member Avatar
+0 forum 5

As suggested by Duki in [URL="http://www.daniweb.com/forums/thread298488.html"]this thread[/URL] I figured I'd compile all the workable examples and explanations here towards the question of "Why do we use get/ set to change properties?" [QUOTE=pritesh2010]Properties provide the opportunity to protect a field in a class by reading and writing to it through the property. C# properties enable this type of protection while also letting you access the property just like it was a field. Becuase of get /set our class contains control over the input. let say E.g. if you don't need to use get/set. you colud write function for setfunct or getfunct …

Member Avatar
+2 forum 0

The End.