Gungnir's Profile User Rating: -----

Reputation: 152 Stalwart
Group:
Rep Abusers
Active Posts:
533 (0.43 per day)
Joined:
21-May 11
Profile Views:
7,554
Last Active:
User is offline Nov 11 2013 07:36 PM
Currently:
Offline

Previous Fields

Country:
AU
OS Preference:
Linux
Favorite Browser:
FireFox
Favorite Processor:
AMD
Favorite Gaming Platform:
XBox
Your Car:
Who Cares
Dream Kudos:
100

Latest Visitors

Icon   Gungnir 4 hours sleep and I feel fine!

Posts I've Made

  1. In Topic: Program with 200 random numbers?

    Posted 4 May 2013

    You might want to start here:
    - Oracle Docs > Random
  2. In Topic: enum type

    Posted 4 May 2013

    Well, you need to close your statement with a semi-colon, but besides that this enum is fine.
    public enum GroceryType
    {
        FRESH,FROZEN,CANNED,REFRIGERATED,DELI,PACKAGED;
    }
    
    


    Quote

    and have it print out in the inventory report when the user is asked to do so.

    I'm afraid that you'll have to write some functionality before we can help you with that functionality. I would suggest starting with some System.out.print() to print directly to the console. I'm assuming you've covered that, as it's the Hello World of Java.

    Further Reading:
    - Oracle Docs > Basic I/O [Tutorial]
  3. In Topic: One to many relationships in Java

    Posted 4 May 2013

    View Postpbl, on 04 May 2013 - 06:29 AM, said:

    View Postla_faker_81, on 04 May 2013 - 08:07 AM, said:

    Ideally if I delete a customer from the system, it should also delete all the records of their houses.

    In the real life, when a person passes away, its houses do not vanish/disappear.


    When a customer passes away -- or is otherwise relinquished of their ownership of the house -- the house returns to the market. Just like you would do cleanup on, say, a game before you terminate it, so to must you perform cleanup on the house ownership in this scenario.

    Have a separate method that removes a customer, AND puts all of their houses back on the market (which would, as pbl recommended, require an extra collection structure of houses (or a class, since it would require methods) to be listed outside of the customer-house-maintenance structure. However, once a customer chooses to buy the aforementioned house, you take it off the market, and copy it over to their collection structure of currently owned houses to be maintained (if that is the kind of functionality that you have planned, which would make a lot of sense if customers were able to own multiple houses, as suggested by your question).
  4. In Topic: how to get database table column values to jcombobox in java

    Posted 4 May 2013

    Quote

    but the problem is by default its selecting the first item in the list, how to avoid that

    In the JComboBox? Is that not expected? I linked you to a tutorial before that covered the subject.

    ORACLE said:

    petList.setSelectedIndex(4);
    
    


    If that wasn't the subject of your issue, I apologise. Your question may require refinement.
  5. In Topic: Problem with adding user input created objects to ArrayList

    Posted 4 May 2013

    Quote

    I get error: cannot find symbol, symbol: variable z (all variables). Any idea?

    I don't expect you to plug in variables that don't exist, those are just the parameter identifiers that you've chosen for your constructor. Use values that do exist.

    are znamka, model, velikost, barva, cena, popust, and zaloga declared in your parent class?

My Information

Member Title:
Your Imaginary Friend
Age:
21 years old
Birthday:
November 30, 1992
Gender:
Location:
NSW, Australia
Interests:
this
Full Name:
Callum McLennan
Years Programming:
5
Programming Languages:
C++, Python, Java, JavaScript, PHP

Contact Information

E-mail:
Private
Skype:
Skype  UnisexBathroom

Comments

Gungnir has no profile comments yet. Why not say hello?