Questions tagged [class-structure]

39 questions
0
votes
1 answer

How to properly structurate the visibility of this Class?

I'm trying to improve an old Class that I've wrote to manage an INI file, the Class contains 3 sub-Classes (File, Key, Section) to separate and organize the procedures (procs for the ini in general, procs for manage the keys/values, and procs for…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
0
votes
0 answers

The hierarchy of the type 'classname' is incosistent--java error in eclipse

I have a class CircleController, which extends a class VehicleController, and I am confused as to why I am getting this error. any help would be greatly appreciated. The CircleController is... import java.math.*; import javax.realtime.*; public…
user3014093
  • 389
  • 2
  • 5
  • 20
0
votes
4 answers

Error - Class interface or enum expected

I am new to java and i am writing this code in notepad which is giving me errors.In netbeans although package is already defined.How to do this in notepad? package A; class A { private String name; protected String company="oracle"; …
sugam
  • 17
  • 1
  • 1
  • 5
0
votes
0 answers

Proper way of structuring classes?

I have a class Bank. A bank has a name, a list of Accounts. I have two banks, bank A and B. Accounts at bank A are slightly different from accounts at bank B and my question is basically how would one go about implementing such a structure? I had a…
Paul
  • 766
  • 9
  • 28
0
votes
1 answer

Messages Between Two Distant Classes In Java

I have been working on a Java game for a few months now and I've run into a problem. My Player walks around in an Environment, which is comprised of tiles that all have their own CollisionBox. Put simply: when the Player's CollisionBox collides with…
benny.bennett
  • 700
  • 1
  • 8
  • 25
0
votes
1 answer

Quick and dirty way to populate tree with package listing

is there a quick and dirty way to populate a jtree ( root and child nodes ) of a specified package? so for instance: com.mycompany.components.ComponentA com.mycompany.components.ComponentB com.mycompany.components.ComponentC Is there a way in…
delita
  • 1,571
  • 1
  • 19
  • 25
-1
votes
2 answers

How would you design class structure for a building, floors and space- Object-Oriented

What would be an elegant OOP design for these requirements? "Design class structure for a building, floors and space. The space can be an apartment, a store or an office. Include any properties, fields and methods you think would be interesting to…
alvas
  • 115,346
  • 109
  • 446
  • 738
-2
votes
1 answer

How to call a variable using Stroustrup's Fltk Text class?

I want to create a text on a window. I am using the built in FLTK and GUI C++ libraries from Stroustrup's programming website. One of the classes he has built in is the Text class inherited form class Structure. The general formula for attaching…
-4
votes
2 answers

Why is string[] recognized as just a string

I'm trying to keep my XML class separate from my Math class. I'm reading an xml file looking for what time the person started and putting that in a string[] (I think??) public static string elementStartWeek() { XmlDocument xmldoc =…
Frank Pytel
  • 127
  • 16
1 2
3