88 Topics

Member Avatar for
Member Avatar for CrazyProgrammer

Hey, was wandering if somebody could help we with some classes and objects, I haven't done c# in a while and i can't remember. Could someone tell me what String falls under in c#, ie allowing one to write somthing like [CODE] static void Main(string[] args) { string s = …

Member Avatar for CrazyProgrammer
0
154
Member Avatar for terexberd

Hey guys, i just wanted to know the codes for ArrayList class methods such as .clear() .add() .size() .isEmpty() etc... Your help will be appreciated!

Member Avatar for terexberd
0
211
Member Avatar for progr

I am having problems accessing a variable from one class to another. [CODE] class Player(pygame.sprite.Sprite): def rotateShip(self, rotAmt): radians = self.rotation * math.pi / 180 [/CODE] I am trying to use the variable radians from class Player to another class. radians only exists in 'rotateShip'. Thanks for your help in …

Member Avatar for Gribouillis
0
151
Member Avatar for KenyanRaphael

I've been teaching myself java using youtube videos of Starnford Engineering Everywhere. So far its been good, till the code started getting complicated and i got stuck. I need advice on how best to learn java.

Member Avatar for KenyanRaphael
0
217
Member Avatar for zach&kody

My friend and I are in a Computer Science I class, and we are momentarily working on a project which asks you to import a method from a previously edited source, into another java source file. Here is our code. [CODE]import java.awt.Graphics; import java.awt.Color; import java.awt.Image; import java.awt.Container; import javax.swing.JFrame; …

Member Avatar for zach&kody
0
6K
Member Avatar for speedy94519

Hello, I have a question about the code below [CODE] // Checks the vertex a if (this.a != ((Triangle)o).a) { return false; } [/CODE] So In a method called Triangle i declared an instance variable like this: [CODE] private java.awt.Point a [/CODE] What I think this code is doing is …

Member Avatar for jon.kiparsky
0
149
Member Avatar for saveme123

How do you write a method that switch a space " _ " with a letter, the example my teacher gave us to work with is: [CODE]public static int seqSwapSearch ( int[] list, int item) { int location = -1; int temp; for (int i = 0; i < list.length; …

Member Avatar for code learner
0
88
Member Avatar for incubus9x9

Please dont tell me to "google" it obviously I'v tried everything and this is my last resort. k thanks :) ok so I have to set a value to be restricted in the constructor ___________ Modify the constructor and set methods of the Shape class to verify the values of …

Member Avatar for seanbp
0
203
Member Avatar for adanaz

Hi guys I'm trying to take a user input (name) and replicate the input in other methods. Can anybody help? Here is the code: [CODE]import javax.swing.JOptionPane; public class example { public static void main (String[]args) { entername(); } public static void entername() { String a=""; a = JOptionPane.showInputDialog("Welcome. Enter name …

Member Avatar for adanaz
0
953
Member Avatar for Oregand

Hey guys, im just learning how to use methods but I really cant seem to understand them. We have a question where we have to write a program for the following game. There is a little known dice game which is played with a pair of dice and has the …

Member Avatar for Oregand
0
3K
Member Avatar for Oregand

Hi guys, Im pretty new to programming so bear with me if you think this is baby stuff:P Ive just been introduced to methods last weeks and after a week of study Im no better at understanding them. The problem is I just seem to grasp how to you them …

Member Avatar for Oregand
0
129
Member Avatar for chrelad

Hi everyone, I made a very quick and dirty PHP speed testing system ([URL="http://chrelad.awardspace.com/speed"]chrelad.awardspace.com/speed[/URL]) and was looking for feedback on different tests that I could add to it. I've only got two tests going right now: Comparison of string concat/replace methods [LIST] [*]Heredoc with interpolation [*]Double quote with interpolation [*]Double …

Member Avatar for chrelad
0
169
Member Avatar for doctorjo5

I'm having trouble figuring out a few different methods that I'm putting into a constructor. Any chance for advice? I'm having trouble with the last 3 near the bottom. I want to compare two name variable to each other to see if they are the same regardless of case, then …

Member Avatar for NormR1
0
199
Member Avatar for DanHu

ok so i have 3 separate classes: Product, Action, and Invoice. Action would be my interface that allows me to add and remove items in my hashmap that is in my Invoice class. my Product class would have the instance variables name, info, id and quantity (correct me if I'm …

Member Avatar for NormR1
0
503
Member Avatar for Pado

Hi all, I've finally gotten a handle on object-oriented programming (it took ages), and I really like it. But I'm still struggling with conceptualizing some things. For example, if I want to make a form using objects, do I make a Form class with a method like startFORM($name_of_action_page, $method), then …

Member Avatar for Stefano Mtangoo
0
176
Member Avatar for Iamthecheese

Hello, I'm working on an assignment due next week and I'm having quite a bit of trouble. The program is to ask the user for input of a double until they desire to stop. That part, I imagine will be in the Test file. The master file is to store …

Member Avatar for NormR1
0
184
Member Avatar for Lusiphur

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 …

2
500
Member Avatar for seanvitalaim

Can someone please explain to me why I cannot move variables from object to object. I've been getting no sleep and burning myself out learning java and it is driving me crazy here is the example. [CODE]import static java.lang.System.out; class ONE { public static void main(String[] args) { TWO addition …

Member Avatar for NormR1
0
97
Member Avatar for xx_kandikidd_xx

Hi, I'm having trouble with my Java code. It's meant to read in from a csv file and update the elements on the GUI to reflect this e.g. as it reads in one line, images and text appear on the GUI reflecting the data. Anyway, to get the GUI to …

0
93
Member Avatar for pateldeep454

What are the pros and cons of class and object methods? Which is more concise (usually)? What kind of computations can be expressed most naturally using each style)? Explain PLZ!!!

Member Avatar for quuba
0
86
Member Avatar for benqus

Dear Dudes! =) If anybody has a complete list of php methods separate in a file, please share it with me! I really need a txt file containing all of the PHP methods. It goes for my diploma work also... =) Ex: [CODE] for(){} //new line if(){} //new line switch(){} …

Member Avatar for benqus
0
146
Member Avatar for picabodaddy

Trying to learn Java on my own with the book "Starting out with java" The question is this Write a class that has three overloaded static methods for calculating the areas of the following geometric shapes: circles rectangles cylinders (it gives the formulas for the are of them) Because the …

Member Avatar for vchandra
0
3K
Member Avatar for JanieRae

I've just started programming, and I'm taking a java class as one of my electives this year. We have a program due tomorrow and I'm very much lost. I think i know what I want to do, but I don't understand the concept or know enough code to get everything …

Member Avatar for jwenting
0
138
Member Avatar for jk8204

I need to design a class to represent an oven control unit containing: - Three constants (COOK, BOIL, SELF_CLEANING) with values of 1, 2, & 3. - Boolean value 'on' to represent oven is on or off - Int value for cooking temp, actual temp, and cook time (in min) …

Member Avatar for Katana24
0
119
Member Avatar for MktgRob

I was recently approached by a local limo company who is investigating adding a web-based booking system that would allow people who need to hire a car service for a trip to the airport or some other one off type of rental to do so on-line at anytime. This would …

-1
95
Member Avatar for Ecliptical210

Hi guys, so I have this project where the requirements are as follows. Create a class called Car, which serves to represent a particular vehicle at a car dealership. Consider that each car has the following properties, entered by the user (all value ranges should be error checked): Sticker price …

Member Avatar for Ecliptical210
1
132
Member Avatar for Froger93

Hey guys, I have a problem. I have a connections_lib.php file this will handle all of my db connections, this works AMAZINGLY (power of OOP). Unfortunately some of my other classes require connection to the databse therfore they must use these methods (is that the right word for OOP I'm …

Member Avatar for Froger93
0
179
Member Avatar for RejectKid

I have a program i have to build for class using the Player class. i need to be able to remove add show and save and i cant seem to get the for loop to work in the methods. and when i tried passing the class player to the methods …

Member Avatar for RejectKid
1
169

The End.