462 Topics

Member Avatar for
Member Avatar for maalaakhantaurux
Member Avatar for asif49

Hi. I have some css that needs to go into a large amount of websites. It generally contains very simple like all new elements with very unique names that will not be matched by anything these websites currently contain. The problem I am having is that some of these sites …

Member Avatar for almostbob
0
214
Member Avatar for vishalonne

Hi All I have a query regarding constructor and destructor. How accessibility of constructor and destructor affects the scope and the visibility of their class. If someone give some explaination on this I will be thankful. Regards

Member Avatar for David W
0
257
Member Avatar for vivosmith

Hey there, I am getting used to Java, but here is something that is stumping me: // Fig. 3.10: GradeBook.java // GradeBook class with a constructor to initialize the course name. public class GradeBook { private String courseName; // course name for this GradeBook // constructor initializes courseName with String …

Member Avatar for stultuske
0
237
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
341
Member Avatar for Violet_82

Hi chaps, I am looking for a not too difficult exercise which involves superclasses and subclasses (the java book I am reading doesn't really have any good one). So I was thinking about something like this: Create a superclass 2DimensionalShapes and 2 subclasses Rectangles and Triangles. I will then need …

Member Avatar for Violet_82
1
243
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
228
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
706
Member Avatar for klin1344

Hi everyone. I am doing a USACO training assignment, and the instructions are as follows: > Is Friday the 13th really an unusual event? > > That is, does the 13th of the month land on a Friday less often than on any other day of the week? To answer …

Member Avatar for klin1344
0
1K
Member Avatar for mward92

I have made 4 classes that represent an Employee based Java GUI. They are Person, Employee (extends the Person class), EmployeeFrame (used to model a JFrame), and EmployeeTester (contains the main method to run the GUI). What I want the GUI to be able to do, is allow the user …

0
142
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
402
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
224
Member Avatar for MRehanQadri
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
197
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
266
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
262
Member Avatar for bobit

I do not know if I am on the right track or not, but I have hit a dead end. I have read and reread my books chapters about super classes and inheritance and am still completely lost. in this assignment I have to: **Write a super class encapsulating a …

Member Avatar for stultuske
0
571
Member Avatar for bobit

I have to: **write a class encapsulating a sports game, which inherits from Game. Where the game has the following additional attributes: whether the game is a team or individual game, and whether the game can end in a tie. ** I am not familiar with inheritance and am wondering …

Member Avatar for JamesCherrill
0
2K
Member Avatar for gabriel.riveraperossenkopp

I need to write a code with a constructor class in order to see the whole phonelist using an array that reads from a document txt, able to add a person and phone number, search just one person in the phonelist and able to modify their phone number. here is …

Member Avatar for elhkei
0
704
Member Avatar for xHellghostx

I am having a problem to understand how class inhertance works in Java.. Now I want to get information from a class to another and let's say we have class A and class B class A contains a string an int and a byte class B contains a String and …

Member Avatar for stultuske
0
281
Member Avatar for MRehanQadri

We cannot use constructors if we want that whenever a pointer is declared, it should be NULL. Am I right Sir? if I declare student *head, *tail, where student is a class, can I make my pointers automatically make NULL using default constructor?

Member Avatar for Moschops
0
167
Member Avatar for xHellghostx

For example let's say we have the property called Customer that returns a value of name String name; <== Global Variable public String getName() { return name; } public String setName(holdingName) { name=holdingName; } and a constructor called Match public FullName(String realName) { holdingName = realName; } Can I do …

Member Avatar for stultuske
0
319
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
306
Member Avatar for phfilly

Hi all! I just have a quick question about the execution of a copy constructor. This is the code i'm testing my work with as I'm busy learning for a test. Class file: Clock :: Clock (int h, int m, int s) { hr = h; min = m; sec …

Member Avatar for can-mohan
0
293
Member Avatar for Begginnerdev

Upon aiding a friend - I have decided to post the example used here. The following is a snippet that shows basic class inheritance. The source file as well as a test case can be found attached. You can test these classes with the following code: Dim cNew As New …

3
219
Member Avatar for ambageo

Hi! I am supposed to write a programm for making a window.First of all, I must make a window with some given default values. Below is the code that I have been given as a template public class Window { private String name; private int height; private int width; private …

Member Avatar for ambageo
0
209
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
931
Member Avatar for asteriskLMNOP

Please bear with me, this is my first post So, I have this superclass called A. And I've 2 subclasses A1 and A2. A has attribute name. A has function toString(). A1 inherits name, and has attribute hair. A1 has a method toString() which goes: string A1::toString(){ string stringA= A::toString(); …

Member Avatar for ravenous
0
1K

The End.