Advertisement
Guest User

Tanner's discussion notes

a guest
May 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.94 KB | None | 0 0
  1. ====WHAT I'M DOING WITH THE DATA CLASSES====
  2. AuctionStaff User:
  3. - will be the only one who gets direct access to calendar
  4. - AuctionCalendar class will have setter methods for adjusting default values
  5.  
  6. All Other Users:
  7. - Will be given the DataHandler, which will contain all methods for retrieving the necessary info
  8. from calendar/user databases. This lets me funnel data through one location, and ensures every individual person
  9. isn't doing something different with the data. If there are more methods you guys need, just let me know and I can write them out.
  10.  
  11.  
  12. ====MY IDEA ON HOW THE PROGRAM SHOULD FLOW====
  13.  
  14. Suggested flow of the program:
  15. 1. Run Program
  16. 2. GUI Frame loads, with the login panel loaded by default
  17. 3. User enters email, login panel identifies user type, opens a new BidderGUI/ContactGUI etc based on type of user. This panel replaces the login panel.
  18.  
  19. Observable/observer (SUGGESTED, I am not an expert in GUI stuff so disregard if this won't work)
  20. - Frame extends JFrame, implements Observer
  21. - Calendar extends observable
  22. - Frame has a JPanel variable that references the current active panel.
  23. - Each panel has an updateValues method
  24. - When a change is made in the Calendar (new auction added, new bid added, etc etc):
  25. 1. The Calendar class does the notify call
  26. 2. The frame sees there is a change, and calls to the update method of whatever panel is active (via its reference variable)
  27. 3. The update method then calls to applicable methods for updating fields. For example: it can clear out a window that lists all upcoming auctions, and repopulate it again. New variables will show up if there are any, otherwise it
  28. will just repopulate the same thing.
  29.  
  30. This might not completely efficient, but it will still update instantly (because computers are fast) and it will probably be pretty clean.
  31.  
  32.  
  33. ====QUICK DESCRIPTION OF METHODS BEING ADDED TO DATA HANDLER====
  34.  
  35. Data Handler methods so far:
  36. 1. get a user (mostly just for login)
  37.  
  38. 2. getAuctionsByOrg() <- returns an ArrayList of auctions that belong to a certain organization. Can replace the array list in a contact's class (since a contact belongs to an org)
  39.  
  40. 3. getAuctionByID() <- Self explanatory. Each auction has a unique id
  41.  
  42. 4. getActiveAuctions() <- Returns an array list of auctions that have been scheduled but haven't yet happened
  43.  
  44. 5. getAuctionItemsByAuction() <- returns a HashMap<Integer, AuctionItem> of auction items. Really, this just returns
  45. the inventory sheet in the Auction class, but it can be rewritten if you guys want to remove that field from that class.
  46.  
  47. 6. getAuctionItem() <- two versions of this exist, (overloaded constructor), one is by just auction item ID, which iterates through all auctions looking for the item id, and one that accepts an itemID and an Auction, which works a lot faster. Either can be useful depending on situation.
  48.  
  49. More to come as well...let me know if theres anything you guys know you need.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement