234 Topics

Member Avatar for
Member Avatar for CodingCabbage

I wish to use parameters in a class to change what the class displays how would this be done?

Member Avatar for rrashkin
0
270
Member Avatar for CodingCabbage

I have these few lines in a class in my program but it doesnt appear. No errors are shown and when i "print(menubar)" and address "0.4.." or "4..." appears menubar = Menu(master = self.mainGUI) fileMenu = Menu(menubar) fileMenu.add_command(label="Exit", command= destroyMethod) menubar.add_cascade(label="File", menu=fileMenu) destroy method does work and is existing.

Member Avatar for CodingCabbage
0
296
Member Avatar for Tyler_1

The title says it all but I am curious if it's acceptable or even efficient for that matter. If others were to read my code or work on a project with me is this generally accepted among others or yourself if you work on an enterprise level? Is this memory …

Member Avatar for Tumlee
0
315
Member Avatar for kruschev

#include <string> #include <iostream> #include <vector> using namespace std; class Person { public: Person(); Person(string n, string a, string tel, string em); string getName(); string getAddress(); string getTel(); string getEmail(); virtual string whatAmI(); private: string name, address, telephone, email; }; Person::Person() { } Person::Person(string n, string a, string tel, string …

Member Avatar for Krimeplay
0
358
Member Avatar for cgull

Hello, I am developing a site where I have once class file that deals with a few database tables. My question is: Is it better to have one big file (the class) and then require only this file or have a class for each table and then have more require …

Member Avatar for jkon
0
213
Member Avatar for Meikell 'Kai'

So! I'm building a GUI for an application I'm currently developing and I'm having a bit of trouble figuring out an issue. I'll try to explain it as best as I can in the code lines. Basically, I built a class to handle the initial window for the program, but …

Member Avatar for Meikell 'Kai'
0
2K
Member Avatar for pardeepkhatri
Member Avatar for lionaneesh

[B][I][U]Introduction [/U][/I][/B] [COLOR="Red"]Hey everybody welcome to a tutorials on classes in PYTHON. The purpose I made this tutorial for is that when I was learning classes in python I dint found any good tutorials on Classes. Maybe I was wrong. But here's my tutorial.[/COLOR] [B][I][U]Layout[/U][/I][/B] In this tutorial i'll be …

Member Avatar for mail2sanjay
1
847
Member Avatar for murali2489

Hi All, I have just finished reading fundamental topics in Java and now i have decided to do a New Project in Java which comprises all basic features of Java. I need help in Understanding/visualizing the architecture / Design model for my Project. Specification is : 1 . Develop a …

Member Avatar for stultuske
0
310
Member Avatar for tanatos.daniel

I have the following structure: CObject { protected: char *mName; public: CObject(char *n) { mName=strdup(n); } }; CVector:public CObject { char *mValues[50]; int mElements; public: CVector(char *n):CObject(n) {} }; CMatrix:public CObject { char *mValues[50][50]; int mLines; int mColumns; public: CMatrix(char *n):CObject(n) {} }; My main function: int main() { pV=new …

Member Avatar for deceptikon
0
382
Member Avatar for dreking6

am a python beginner, receeently started learning about classesand i wrote this got this little code that keeps bringing this error . please i need someone here to help debug it: class employee(): ` empcount=0` def _init_(self,name,salary): self.name=name self.salary=salary employee.empcount=+1 def displaycount(self): print 'Total employee: %d' %employee.empcount def displayemployee(self): print …

Member Avatar for dreking6
0
6K
Member Avatar for mmcdonald

Hi all, I've been playing around with PHP for a while now and never really studied hardcore (Just used it as best as I could on a whim) but I've now decided to sharpen the skill and get much better. I'm playing around with my first class and would like …

Member Avatar for mmcdonald
0
501
Member Avatar for eldiablo1121

hello, I just had a quick question on my program. I'm trying to perform an elevator class program to simulate an elevator that has 3 stops. The only problem is that I can't figure out how my floors increase or decrease, it just increases by one. Here is my code: …

Member Avatar for eldiablo1121
0
220
Member Avatar for corliss

Hi All, I have created an application that allows a user to select a diectory, where we parse the photos, and upload to a database. The issue that I am having is that I have a button on the form found in the newJFrame.java class called upload that when pressed …

Member Avatar for corliss
0
355
Member Avatar for AppleR

So basically im creating this python adventure text game. And so far its good. But i have this problem with class instances(Is that the right term?) Say for example i have this class, class monster(object): def __init__(self,health,attack): self.damage = damage self.health = health So then I create a class object(again, …

Member Avatar for AppleR
0
340
Member Avatar for joshua.klaser

Essentially I have two header files, one called 'ACYDTypes.h' that contains the classes for the basic types of this system and the other called 'Settings.h' that contains function for general settings. In the Settings.h file, there is a namespace called 'Ac_Type_Settings', and within that is a class called 'AcTypeSettings'. This …

Member Avatar for joshua.klaser
0
225
Member Avatar for noor.beetna

I want to write a program in c++ language to define a class Bank_Account with the following members: Data member: - Accoount_no. - owner. - Balance. Member fenctions: - To assing intial values. - To deposit an amount. - To withdraw an amount after checking the balance. - To display …

Member Avatar for zain.imtiaz
0
134
Member Avatar for andymarin

Hi guys, I'm having trouble with my code and I'm kind of new in Java so I don't know what to do. I have to do a program with Buttons and each button has to take me to another class (I don't know if I'm being clear). For example if …

Member Avatar for andymarin
0
703
Member Avatar for Yiggasay

If my goal is to consider f1 and f2 to hold the numerator and denominator of two fractions and multiply f1(9,8) by f2(2,3). i don't understand how to write the MultipliedBy function if I only have two member variables in the class it's self. I feel like i'm just missing …

Member Avatar for tinstaafl
0
401
Member Avatar for Melly3

Hi, I'm working on classes with pointers. I do have a main function that calls this. This program compiles. But the input from the user isn't getting passed to the other functions. The user_input function should take the response and pass it to the create_posting then it is outputted to …

Member Avatar for RonalBertogi
1
223
Member Avatar for owenransen

I have to update a road tunnel lighting program I wrote for a company. They now want a new standard to be applied, but with the option of switching between standards real time. And there will be other standards in the future. Currently the single object which calculates the lighting …

Member Avatar for owenransen
0
196
Member Avatar for xHellghostx

Hello guys, so I am facing a problem to understand the following.. Creating a GUI based program that has a user control box that contains a list of images of a 52 cards deck, the cards are based on an enum actually 2 enums one for the rank and one …

Member Avatar for Ketsuekiame
0
255
Member Avatar for greatman05

This is homework. I have been tasked with creating a new dialog in WinMerge that provides line stats for every open file. It should show total lines, lines modified and lines deleted. I am working on implementing the total lines part. I have already created the dialog, a class for …

Member Avatar for Ancient Dragon
0
265
Member Avatar for tayyabatiq

I'm making a class for boolean expressions, a simpler version of bool. I need three operators, one for AND, one for OR and one for NOT. I can easily make **+** for OR, by overloading, but how can i declare **.** for AND and **'** for NOT? Can i even …

Member Avatar for Nutster
0
260
Member Avatar for xHellghostx

So I am working on a program and it has two seperate classes.. One of them contain the forum layout and the other contain some calculations and totals.. The problem is that the class with the calculations contain a constructor and other functions that I need to pass from this …

Member Avatar for tinstaafl
0
305
Member Avatar for nullifyQQ

I have 2 classes. AddressBook and SingleAddress. AddressBook is supposed to contain SingleAddress. I'm omitting the #include and some of the extra functions. Here's SingleAddress.h class SingleAddress { private: string lastName,firstName,strAdd,city,country,email; int postCode,homeNum,mobileNum; public: SingleAddress( string s1,string s2,string s3, string s4,string s5,string s6, int i1,int i2,int i3); string toString(); }; …

Member Avatar for Nick Evan
0
914
Member Avatar for nullifyQQ

I have this weird problem. If my constructor is [header] class Book { private: vector<string>Entry; public: Book(); [cpp] Book::Book(){ Entry.push_back("0"); Entry.push_back("1"); Entry.push_back("2"); The weird thing is that it does not update when I do more .push_back. I use: void Book::addItem(vector<string>newItem) { for(int f=0; f<Entry.size(); f++) { Entry.push_back(newItem[f]); cout<<Entry[f]; } } …

Member Avatar for L7Sqr
0
290
Member Avatar for DarWar

Hi everyone! So I have this code to modify. I need to write a code inside the **int main** field, that would cause 37 launches of the constructor called M_48(). I have no idea how to solve this. Any ideas?

Member Avatar for deceptikon
0
194
Member Avatar for rocksoad23

Hey, I'm developing a program in which there are two classes. The purpose of one of them is to create vectors that change dinamically (class A) and the other is a bunch of methods to operate on these vectors (class B). The question is: I don't see any need to …

Member Avatar for ravenous
0
147
Member Avatar for inaxassan

The human body has many organs (heart, lungs, brain, and kidney, to name a few). We could think of the human body as complex object made up of simpler objects (organ). a) Create classes for heart and brain. Think about what the functions of the heart and brain are in …

Member Avatar for TrustyTony
0
290

The End.