Hi guys, I would like to discuss my design with one query. below is the code snippet. It is clear from below code snippet that class pd is privately derived from AbstractClass as both are different classes and there is no relation between them.Now in my class pd i need ConcreteClassB's service call to proceed further for my version of do_servicecall function so i have overridden the same. Now if you see the do_servicecall functionimplementation inside pd class then you will realize that through servicecall function(defined in AbstractClass) i am able to overide the implementation provided by ConcreteClassB . Here …

Member Avatar
Member Avatar
+0 forum 9

How are keys and passwords stored in a computer to make them secure? If encryption is used to secure keys and passwords - won't there need to be a key or password for it also? Will that one be encrypted as well? It seems to me that eventually there will have to be a key or password that is not secure to get the whole process going.

Member Avatar
Member Avatar
+0 forum 3

Hello guys, i never worked before with java and it was told to me to make a solution of cloud computing private for my university and i don't know how or even which How choose the layer to develop. Can you just help me please.

Member Avatar
Member Avatar
+0 forum 5

how to make a private chat with node.js like a facebook,gmail

Member Avatar
Member Avatar
+0 forum 1

hae please help me understand the use and benefit of a virtual private network.I need to know how to use one

Member Avatar
Member Avatar
+0 forum 5

Hi, Is there any way to not allow private construction in friend function, In case we do have private constructor with friend function in our class.Only Static method should be responsible for object creation and other than this compiler should flash error message. #include<iostream> #include<memory> using namespace std; class a { public: void see () { cout<<"Motimaa"; } static a& getinstance() { static a instance; return instance; } private: a() {}; friend void access(); }; void access () { a obj; obj.see();//still friend function can access } int main() { a::getinstance().see(); access(); return 1; }

Member Avatar
Member Avatar
+0 forum 4

What does a "private" area of a website involve?Webhooks, tokens, APIs? I am developing a website which will allow registered users to register, make a payment, and then get transferred to an area where they write an online essay in a textarea. I DON'T WANT NON-PAYERS TO GO HERE. The payment mechanism that I want is STRIPE.COM or one of its 3rd party affiliates, such as gohelium.com or spacebox.io . With STRIPE (or one of its affiliates, such as gohelium.com or spacebox.io), it's very easy to setup, and after a person makes a payment, I have no problem making them …

Member Avatar
Member Avatar
+0 forum 1

Hi, I am having a problem overriding methods in a subclass when they contain private methods from the master class. The is the master: package blabla; public class Person { private String firstName; private String secondName; private String familyName; public Person() { firstName = ""; secondName = ""; familyName = ""; } /** * Parameter constructor */ public Person(String firstName, String secondName, String familyName) { this.firstName = firstName; this.secondName = secondName; this.familyName = familyName; } public String getFirstName() { return firstName; } public void setFirstName(String setFName) { firstName = setFName; } public String getSecondName() { return secondName; } public void …

Member Avatar
Member Avatar
+0 forum 3

please suggest the best vps provider company in india. i urgently need virtual server hosting provider ...so help me

Member Avatar
Member Avatar
+0 forum 1

how/where to initialize a static private std::list member ?

Member Avatar
Member Avatar
+0 forum 2

i want to represent some locations using a vector map. which website allows this kind of private map creation and sharing. tried arcgis they make it compuslory to make the map public to share. thanks

Member Avatar
Member Avatar
+0 forum 1

Hello, I have been given a class diagram where a variable called light_years must be a const int and stored in the space class, but later on that value must be used in the main file. Below is the space class class space { private: static const int LIGHT_YEARS; public: // -Many functions are here- }; I need to access the value here #include "stdafx.h" #include <iostream> #include "Space.h" int _tmain(int argc, _TCHAR* argv[]) { for (int i=0; i<3; i++) { 8*LIGHT_YEARS; // I've tried 8*Space::LIGHT_YEARS; } system("pause"); return 0; } Is there someway to friend the main function or …

Member Avatar
Member Avatar
+0 forum 3

Hello. The code below returns an error. Please advise what is wrong with it. Thank you. class Login { private var $good_username; private var $good_password; public function Authentification () { private $this->good_username = "myusername"; private $this->good_password = "mypassword"; } }

Member Avatar
Member Avatar
+0 forum 4

consider public class awah{ private int x=0; private int y; private int w; public awah(int width){ w=width; } public void sety(){ y=(Int)(Math.random()*4);}//meth1 public int gety(){ return y; } public void setx (){ x+=this.gety(); } public int getx(){ return x; } public void showUpdate(){ System.out.println(x); } }//end of awah public static void main(String[] args){ awah m = new awah(5); m.showUpdate(); } I expected the update to show the updated value of x+y but it doesn't I want to be able to update the variable x whenever y is set to some random number //frustrated

Member Avatar
Member Avatar
+0 forum 1

Hello! I'm relatively new to C++ and I'm learning about classes and objects. I've learned most of what I know from YouTube tutorials and some books. Well, in almost all of those, they mentioned that it was poor programming practice to make all your data members public, inside of a class. If they are all private, how may I access it from different functions? I think I have a general idea of how to go about doing this, and I will post below. Please correct me if I am wrong. #include <iostream> class testClass { private: int i; public: int …

Member Avatar
Member Avatar
+0 forum 9

General rules is that: 1) A private method cannot be overridden. 2) Subclass method should be a lower access modifier than a overridden superclass method. But the output of the program is "I am Son". Why? Is it because of the rule 2 the output comes? If that's the case here, then two rules of overriding I mentioned above are clashing, aren't they? Help please. Thanks.

Member Avatar
Member Avatar
+0 forum 8

It's useless. Why are stupid classes in C++ having private members for? [snip] I am never using OOP in C++ I'm just using structs to organize data fuck OOP and classes it's so ridiculous to me that I'm SMH

Member Avatar
Member Avatar
-1 forum 5

I totally understand this is probably not what it was actually called but i dont recall, what I am looking for is the page where you would see some info on reputation changes and post statistics and other stuff, but it was not the public profile that other users can also access and consult. Does anyone know what im talking about? there was also links to see statistics about traffic income to daniweb for code snippets and stuff like that. Just wondering where it all went, Im not a big fan of the new design but i guess ill get …

Member Avatar
Member Avatar
+0 forum 13

Hi, I'm a pretty new Java student and I was just confused on a few basic concepts. What exactly is the difference between public and private classes and in which case would you use each one? also, what is a constructor, mutator, or accessor? Thank you.

Member Avatar
Member Avatar
+0 forum 4

So, I'm a bit confused with how inheritance works in relation to variables. Let's say that I had the following class: class Test { private: int var1; float var2; public: void getInfo(int,float); void setStuff(int,float); }; Now, let's suppose that I wanted to derive a class from that base class; I want the derived class to be able to access member functions from the base class to modify its own private variables, but not overwrite the variables of the base class. How would I define the derived class?

Member Avatar
Member Avatar
+0 forum 1

Hi everyone, I'm a moderate-level C++ programmer who is a little rusty at the moment. I've got an object question which is driving me nuts. I'm sure this is a C++ 101 level question, but for the life of me, I can't recall the solution. Basically, I've got one object which has to access private data in another object... and can't. Here's the specifics: I'm writing a little war game program where players deploy units (soldiers, tanks, planes, etc.) onto a gameboard. Players and Units are modeled as objects: [CODE]class GameUnit { public: string GetName() {return Name;} protected: string Name; …

Member Avatar
Member Avatar
+0 forum 7

Hello, I am trying to set up E-Commerce using Magento. I was wondering if I need SSL for it. If all the transactions are through PayPal then do I need it? And if I do need SSL, can I use shared or does it have to be private. Thanks

Member Avatar
+0 forum 0

Hi all new to this forum, just thought i'd post in here because i am having a bit of trouble with an assignment... basically i have this class in a header file called Product.h... [CODE] class Product { private: int _id; unsigned int _price; public: }; [/CODE] I access this code a lot as i have an array of products in my main.cpp but we had to change this from a struct to this so i have done so and had to create a new source file (product.cpp) for the get and set functions but i am having a bit …

Member Avatar
Member Avatar
+0 forum 4

So I'm trying to write a program that is due tomorrow. I am trying to overload operators and dealing with template classes. I have everything written already but keep getting this error whenever i try to compile the driver file: NOTE: proj4.cpp has #include "box.h" and box.h compiles fine, but it says box.h has errors whenever i try to compile proj4.cpp student@student-desktop:~$ g++ -c proj4.cpp box.h: In member function ‘void listT<elemType>::insert(elemType) [with elemType = Box]’: proj4.cpp:51: instantiated from here box.h:18: error: ‘bool Box::operator<(Box&)’ is private listT.cpp:63: error: within this context Here is some of the code that I think is …

Member Avatar
Member Avatar
+0 forum 4

Hi,  Here is what I want to do: I already have a php login system and I want to integrate a private messaging system into it. Does anyone have any recommendations of Private Messaging scripts? Thanks so much, Max.

Member Avatar
Member Avatar
+0 forum 7

Is there a way to make a class visible only from within another class. i.e: [CODE]class myclass { private: class anotherclass { //stuff that only can be used from within a myclass function void dosomething(); float dosomethingelse(); }*anotherclasses; int numanotherclasses; public: int createanotherclass();//creates anotherclass object, puts it in the array and returns its index void dosomething(int index); float dosomethingelse(int index); };[/CODE] But in this example I would need to be unable to make an anotherclass from outside of myclass. Is this possible and if so what is the syntax for it?

Member Avatar
Member Avatar
+0 forum 3

I am trying to do several things. 1. Intialize - engage a user in a series of questions to assign values to the class variables, no args, no return value, called from constructor. 2. Display - displays all the class values, each in an sentence, no args, no return value. 3. getId - returns the id of the Property to the caller, no args, 1 return value, the id of this property. (needed in the "find" method of the class RealEstate. 4. calcTaxrate - calculates a tax rate, based on the values of the variables. It is not necessary to …

Member Avatar
Member Avatar
+0 forum 6

Hi everyone, I'm working on a summer coding project with few friends from school and we have a design issue that we need some input on.(The language is Java) We have for example a 2D vector class called Vector2. It has two properties float X, and float Y. When I was learning Java I was always told that these should be private and have getter and setter methods. The debate is now that if I want to say add up the x components of two vectors and set that to the x component of another vector we now have a …

Member Avatar
Member Avatar
+0 forum 5

I have no idea what is going on here, first, the code: [CODE] #pragma once #include <stdio.h> //#include <stdafx.h> #include <allegro5/allegro.h> //#include <allegro_image.h> class DisplayController { public: int bitmapx; int bitmapy; // ALLEGRO_DISPLAY display; ALLEGRO_BITMAP *crosshairs; ALLEGRO_EVENT ev; ALLEGRO_EVENT_QUEUE *event_queue; void display() { this->event_queue = al_create_event_queue(); al_register_event_source(event_queue, al_get_mouse_event_source()); al_wait_for_event(event_queue, &ev); this->crosshairs = al_load_bitmap("crosshairs.bmp"); if(!crosshairs) { fprintf(stderr,"Bitmap is null!"); al_rest(2.0); } if(ev.type == ALLEGRO_EVENT_MOUSE_AXES || ev.type == ALLEGRO_EVENT_MOUSE_ENTER_DISPLAY) { bitmapx = (ev.mouse.x -60); bitmapy = (ev.mouse.y -60); al_draw_bitmap(crosshairs,bitmapx,bitmapy,0); al_flip_display(); } //al_rest(2.0); } bool mouseClicked() { if(ev.type == ALLEGRO_EVENT_MOUSE_BUTTON_UP) { return true; } else { return false; } } void DisplayController() { …

Member Avatar
Member Avatar
+0 forum 15

I have the following program : [CODE] #include<iostream> #include<string> #include<conio.h> using namespace std; template <class T> class matrice { T **a; int m,n; public: matrice(); matrice(int,int,int); matrice(char *); matrice(int,int,T **); matrice(matrice &x); ~matrice(){}; template <class U> friend ostream &operator <<(ostream &,matrice<U> &); int getNrLinii(){ return m; } int getNrColoane(){ return n; } void setElement(int,int,T); }; template <class T> ostream &operator<<(ostream &os, matrice<T> &b){ int i,j; for(i=0;i<b.m;i++){ for(j=0;j<b.n;j++){ os<<b.a[i][j]<<" "; } os<<endl; } return os; } matrice<char *>::matrice(int linii,int col,int ini=1):m(linii),n(col){ int i,j; a=new char**[m]; for(i=0;i<m;i++){a[i]=new char*[n];} if(ini){ for(i=0;i<m;i++) for(j=0;j<n;j++){ cout<<"a["<<i<<"]["<<j<<"]= "; char *tmp; tmp=new char[100]; cin>>tmp; a[i][j]=new char[strlen(tmp)+1]; strcpy(a[i][j],tmp); delete …

Member Avatar
Member Avatar
+0 forum 1

The End.