462 Topics
| |
| |
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 … | |
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 | |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
is it necessary to include base class in the header and or .cpp file of derived class? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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(); }; … | |
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(); … |
The End.