Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. Design issue [modified]

Design issue [modified]

Scheduled Pinned Locked Moved Design and Architecture
helpjavadesignbusinesstutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Ted On The Net
    wrote on last edited by
    #1

    Help! I'm having trouble reverse engineering the following to OO principles since I'm new to OO. We are rebuilding an old app which was built without any OO applied back in the day. It has a screen which lets us edit payment conditions. The form has a code, description and 2 more controls: an editbox (holds a number) and a combobox (payment condition). The combobox holds 3 values: "cash", "xx days after delivery", "xx months after develivery". In the editbox I can enter a numeric value between 1 and 99. If I select "cash" in the combobox, the editbox is disabled. if I select "xx days after delivery" the editcontrol hold 1..99 days. If I select "xx months after delivery" the value suddenly means 1..99 months. How should my objectmodel look in OO? I'm not sure how to implement the edit/combobox-combination of requirements. The combobox is a fixed value, but the edit makes it variable. Any help is appreciated. Regards, Ted

    - Life would be so much easier if I had the source code! - If Java had true garbage collection, most applications would delete themselves upon execution ;)

    modified on Thursday, May 27, 2010 7:54 AM

    L 1 Reply Last reply
    0
    • T Ted On The Net

      Help! I'm having trouble reverse engineering the following to OO principles since I'm new to OO. We are rebuilding an old app which was built without any OO applied back in the day. It has a screen which lets us edit payment conditions. The form has a code, description and 2 more controls: an editbox (holds a number) and a combobox (payment condition). The combobox holds 3 values: "cash", "xx days after delivery", "xx months after develivery". In the editbox I can enter a numeric value between 1 and 99. If I select "cash" in the combobox, the editbox is disabled. if I select "xx days after delivery" the editcontrol hold 1..99 days. If I select "xx months after delivery" the value suddenly means 1..99 months. How should my objectmodel look in OO? I'm not sure how to implement the edit/combobox-combination of requirements. The combobox is a fixed value, but the edit makes it variable. Any help is appreciated. Regards, Ted

      - Life would be so much easier if I had the source code! - If Java had true garbage collection, most applications would delete themselves upon execution ;)

      modified on Thursday, May 27, 2010 7:54 AM

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Hi, Ted... Not sure what is meant by OO in this context. Looks more like a UI design issue. I think I'd ditch the textbox/combobox combination and go with RadioButtons, NumericUpDown and Labels. Wish I could insert an image here, but, it would look like this: > Three RadioButtons stacked in a column. > The Text for the top radio button would be "Cash". > The Text properties for the other two RadioButtons would be blank. > The second RadioButton would be followed by a NumericUpDown control with a Minimum of 1 and Maximum of 99. To the right of this NumericUpDown control would be a Label that displays "days after delivery". > The third RadioButton would be followed by another NumericUpDown control with a Minimum of 1 and a Maximum of 12. To the right of this NumericUpDown control would be a label that displays "months after delivery". The user would select a radio button and, if needed, either enter or select the number of days/months. Based on which radio button is selected, the program will know how to react. Hope that makes sense. A screen capture would be better. If you want one, I can email it to you. George

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups