Review javadocs and method design

the two file on the site are the files I want you to look at. The first is a pdf discribing the assignment. The other is a exicuteable jar containing my source code.
http://students.washington.edu/cmartin0/
I am new to using javadoc and find myself at a loss as to what to write. The comments always seem pointless because params and methods are rather self explanatory. I feel as though I end up repeating myself when describing many methods. particularity one's with return statements where I have to comment the return value and what the method dose. I would like advice on how to do javadoc commenting as apposed to normal commenting
The part I'm most concerned about is the add method in ShoppingCart. I know it works but I don't think it is the best way of doing it. Every time a textfield in the GUI has action with a valid number it sends a new ItemOrder object to ShoppingCart to add to an array list used for computing the cost. So when changing a textfield from one number to another the last occurrence of that same order must be removed or altered to reflect the new change.
After those two issues would you please give a over all look at the logic and design I used.
Thank you.

JavaDoc on simple getter/setter methods are hard to write, as they are ofent rather useless.
What I usually do is to add not just which value a particular setter sets, but rather what that value means and how it is used in the class. Alternatively, you could put that information into the Class' JavaDoc (especially if you want to describe the interaction of several properties).
Usually you'd like to keep all the information necessary for answering a question in the posting, having to download external stuff often makes people less inclined to help you. I've not looked into your program in too much detail, but it seems to be ok. One missing JavaDoc that I noticed is ItemOrder ("doing stuff...?" is not considered enough, usually ;-)).
ShoppingCart.add() seems to be ok. Personally I'd have implemented it using a ListIterator, but that's not too important.
Regarding the logic and design: They've been pretty much given in the assignment, so there wasn't much creative freedom for you.

Similar Messages

  • Checking Javadoc and Method Signature ?

    Hi All,
    Once i used Intellij IDEA. Now i am using eclipse for the past 1 year. In IntelliJ if the javadoc and method signature parameters were different it will automatically show a red color mark. so that we will correct it by seeing that.
    In eclipse i don't know that option...can anybody please let me know whether that option is avaiable in eclipse.
    How to check javadoc and method signature in other normal circumstances programmatically ?
    Thanks,
    J.Kathir

    That information is only available in the source code. I'm using Eclipse and it has the ability to link a jar to it's source (either another jar/zip or another project, or a directory on your disk). I imagine IntelliJ has a similar feature.
    Another option is to put the source code inside the jar that also contains the class files.

  • Adding data members and methods to generated classes that will not produce

    I want to use XMLBeans XMLObject for a project, but for the classes generated by XMLBeans, I want to add some additional data members and methods to handle program state that I do not want to have written out to an XML document.
    I have been using .NET's system.xml.XmlParser class, and it provides this sort of capability.
    In looking at the code produced by XMLObject, it looks possible.
    Question: Does anyone have any thoughts on the best way to accomplish what I want to do? Is there a good design pattern to follow?
    Question: Are there any gotchas in doing this? The only immediate one I can think of is that everytime the .java files are regenerated by XMLObject, I will have to reinsert my data members and methods.

    Hi Chuck,
    Setting the dispaly Field property should in no way affect your validation execution.
    The valiadtion if is working fine on the field value when it is not a display field it should do so when a display field as well.
    Besides if you are working on MDM main table all the main table fields are display fields.even if you do not set the property.As main table fields are always visible in MDM Data manager.
    Which version of MDM you are currently working on.
    As I have tried on the SP06 version on MDM and the  Null  validation runs fine on Display fields as well.
    Check your MDM version and also your MDM clients as well as MDM server be on the same version.
    What I am finding confusing here is that initially you wish to keep the material number as Blank for the approver to enter the material number which will be send through a mail.
    But the validation is checking for the material field to be balnk then how are you poulating the same field with Material number in the later stage.As it will fail the validation here.As per teh vlaidation it should remain blank as soon as someone enters a value it will throw an error.
    Or in either which wise you need to mainatin 2 valiadtion steps before and after the Approver for blank and filled field check.
    Just check your process flow correctly and the order of it in case that is causing the records to fail.
    Hope It Helped
    Thanks & Regards
    Simona Pinto

  • How to learn technics in wrting class, objects and methods

    Hi ,
    I am new this oops methodology. I know java language but don't know the basics. I mean to say I have no idea how to write classes and methods. I can write one single class with all the methods and I can call that class from an another class but this is not the way... I knew it but I am kinda confuse how to write the well structured oops style classes and methods....
    Can anybody help me please........
    Thanks

    A short simple (overly simple) explanation is that objects are like little machines, which operate independantly from other objects (other little machines). You design an application as a collection of these little machine/objects, interacting with each other. Then you drill down another layer of detail, and design the machines themselves. You do this by defining the classes, which are like blueprints to make a little machine/object.
    In java, this is largely expressed by the interface definition at the higher level, and the class definition at the lower level. The interfaces say how various objects may talk to each other, and the class definitions say how any individual object may talk at all.
    This is a very basic description, and in fact isn't entirely accurate; if they want to lots of people on this forum could pick it apart. But hopefully it gets the idea across. (As my language design prof said, quoting somebody else, "teaching is just a series of lies.")
    There are resources on the web about object-oriented programming, object-oriented design, etc. mutmansky's right, a college course is best, but you can still learn a lot from docs on the web.

  • Inherited fields and methods shown with the class own fields and methods

    In each subclass page, javadoc includes the fields and methods of the superclass as if they were declared in the subclass. However the methods inherited from Object are shown in a separate box.
    Is there a way to make javadoc group all inherited fields and mehods in separate boxes, one for each superclass?
    I'm using the javadoc tool from J2SE v 1.4.2_07 SDK with NetBeans 4.0 Bundle.
    Thanks.

    Yes, I know it does, but it seems that the superclass
    must be declared public.Sort of. Per default javadoc documents public and protected types and members. With this setting, where would you expect the documentation of public members of a package-private super class to be?
    If you specify -package or -private as an option for javadoc, package-private and/or private types and members are documented, too, so package-private super classes are documented as usual.

  • Pls help me on finding info abt classes and methods....

    hi.. I'm new to java .. but i know the very basics of it.. so that i could write a couple of simple programs.. I've been working wit .NET all these days and MSDN library helps me a gr8 deal.. it gives explanation for every class and methods of the class, even explaining the parameters passed into the methods.. I'm currently workin wit J2ME for developing MIDlets... As i know the basics programming isnt very bad.. but where can i find the explanation for the classes used in micro edition or the methods that belong to the classes...
    Is there any facility like MSDN library for java where i can find the whole information...?????
    Pls help with....
    Thanks for ur patience...

    * Goto [http://java.sun.com/j2me/docs/|http://java.sun.com/j2me/docs/]
    * Click on link "MIDP 2.0 Specification (JSR 118)"
    * Under Specification, Click on Download
    * Hit Accept License Agreement
    * Download ZIP file (not the pdf version)
    * Unzip file and view files
    * Enter folder "midpng-javadoc-final"
    * Open Overview.html
    * Find link "JavaDoc API Documentation".
    [Ref.|http://www.java-tips.org/java-me-tips/midp/where-is-j2me-api-javadoc.html]

  • Track public classes, interfaces and methods by ID

    Hi All,
    I'm wondering whether there is a tool to assign a unique ID to classes, interfaces and methods (eg. within Javadoc) and track these IDs.
    The reason I'd need such a feature is that I'd like to do requirements tracking in an easy but complete way. I have a document containing functional specifications (with IDs) and on the other side there is the source code; where the javadoc of the public methods and classes is my software specification. What I now want to do is make a link between the IDs in the functional spec to the IDs in the sofware spec (ie. the source code).
    Does anybody know of such a tool (commercial or not)?
    Thanks,
    Daniel

    I'm a bit confused as to whether or not I understand you correctly. Please tell me if the following pseudocode is somewhat like the solution you are looking for:
    class MethodFunctionality {
       private Class methodClass;
       private String methodSignature;
       private List methodFunctions;
        *   Returns true if the method is used for the specified
        *   requirement, false otherwise.
       public boolean fulfills(int requirementId) {
          if methodFunctions.contains(requirementId)
             return true;
          else
             return false;
       public String getMethodSignature() {
          return this.methodSingature;
       public Class getMethodClass() {
          return this.methodClass;
        *   Returns an array with IDs of each functional
        *   requirement covered by the method.
       public int[] getCoverage() {
          return this.methodFunctions;
    class ClassFunctionality {
       private Map methodDetails;
       private List classFunctions;
       public MethodFunctionality getMethodDetails(String methodSignature) {
          return (MethodFunctionality) this.methodDetails.get(methodSignature);
        *   Returns true if the class is used for the specified
        *   requirement, false otherwise.
       public boolean fulfills(int requirementId) {
          if classFunctions.contains(requirementId)
             return true;
          else
             return false;
        *   Returns an array with IDs of each functional
        *   requirement covered by the class.
       public int[] getCoverage() {
          return this.classFunctions;
    }Mapping classes and methods to functionality like this would both allow you to query each class and method for all the functional requirements they claim to cover and would allow you to collect all classes and methods involved for a particular functional requirement.

  • Problem using PID toolkit and control design toolkit to design the closed loop system. (for DC motor closed loop)

    Hi, i have facing some problem during i upgrade a project. This project is an opened loop system, it only achieved up to controlling the speed of motor, detecting the speed of motor, and switching the direction of motor while controlling the motor (This motor is a 12 VDC motor).
    In order to improve the project, closed-loop dc motor control system will be implemented to correct the error of the motor's speed and maintaining the speed for the initial setting. I would like to use PID control method to do the closed loop system.
    I already installed the PID toolkit V8.2 and control design toolkit V2.1.2, and i'm using DAQ usb 6221, LabVIEW 8.5
    Below is my problem.
    http://img177.imageshack.us/my.php?image=howtocreatethesetpointnx2.jpg
    question: 1. How to generate a icon for set point? my setpoint is duty cycle...
                    2. How to feedback the output duty cycle to summing junction?
    below this is my basic concept
    http://img237.imageshack.us/my.php?image=closedloopbz5.jpg
    Problem 2:
    http://img357.imageshack.us/my.php?image=problem1yk2.jpg
    question: Why PID toolkit icon cannot wire to cd series.vi?
    Below is my original program...
    http://rapidshare.com/files/140538836/pwm_generate-final_PSMII.vi.html

    Hi Cyrus
    Have you had the opportunity to see our
    developer zone site on the PID toolkit? This article also has sample
    code at the bottom that may help you in developing your application. I
    have also linked below knowledge bases regarding setting a point
    profile and generating a PWM from a digital output line. 
    PID toolkit
    http://zone.ni.com/devzone/cda/tut/p/id/6440 
    How to generate a set point profile:
    http://digital.ni.com/public.nsf/allkb/125F27AC143B6AFD86256C2B0004A4DC?OpenDocument
     How to generate a PWM on a digital output line:
    http://digital.ni.com/public.nsf/allkb/1561D31534F07D608625727900391114?OpenDocument 
    Thank You
    Eric Reid
    Thank You
    Eric Reid
    National Instruments
    Motion R&D

  • Could someone explain the Factory Method Design Pattern

    Hi Experts.
    Could someone please explain for me the Factory Method Design Pattern. I read it a little and I understand that it is used in JDBC drivers but i'm not clear on it.
    Could someone explain.
    Thanks in advance
    stephen

    Basically, you have one class that's sole purpose is to create instances of a set of other classes.
    What will usually happen is you have a set of related classes that inherit from some base class. We'll say for example that you have a base class CAR and it has sub-classes FORD, GM, HONDA (sorry Crylser). Instead of having the user call the constructors for FORD, GM, and HONDA, you can give the user a Factory Class that will give him a copy. We'll call our factory class Dealership. Inside dealership, you can have a static function :
    public static Car makeCar(String type)
    if(type.equals("FORD")
    return new FORD();
    else if(type.equals("GM")
    return new GM();
    else if(type.equals("HONDA")
    return new HONDA();
    So when the user needs a car, they will just call
    Dealership.makeCar("FORD").
    This is a good way to hide the implementation of your classes from the user, or if you require complex initialization of your objects.
    Another good example of this is in the Swing library. To get a border around a component, you call static methods on BorderFactory.
    Hope this helped.
    Ed

  • I am confused its all too technical and non design oriented

    What is Flash Builder, Burrito, Catalyst. Panini - I have used Flash for years and want to create iPad Apps with the technology. I am not a programmer so want to use premade components. All the documentation is confusing and obviously written by engineers - it leaves me more clueless than before. Is there any where I can just get an overall picture of what to do and what to use in what order to achieve a simple throw - nav type App with each screen of content being an interactive page of a childrens book.
    I am making the seperate pages in Flash but need to put them all together in a wrapper to make a system that works. I saw something about a throw nav in the Burrito tech page but have no clue how to get it working. I also want to style the look of look of the whole thing, not use the default graphics.
    I am going to Refresh in Melbourne on Thursday and hope that this time the presenters will demonstrate more slowly and speak English not GEEK.
    Can anyone demytify this whole process and is there anywhere that its explained so us "dumb" designers can understand. Yes I  can write simple code and get around Flash as I used it for years in my job as a mulitmedia designer but I need some help understanding what all these bits do and how to use them. Where is this mystical place where you just drag stuff out a library and use it to create the interface- seems to me from what I have seen in online tutorials you need to create reams and reams of code
    Do I first use catalyst or burrito, then what? Do I take it to Flash to Package? I have signed up with Lynda and watched the training on Burrito but it all makes it as clear as mud. Seems like if you want to use Flash and the other bits you need a degree in programming - what happened to it being more designer friendly?

    Hello. I am on the other end of the spectrum, vast knowledge in coding but very poor UI skills. My background is almost exclusively Microsoft making it a bit more challenging. Being brand new to Flash Builder but having used Flash 8 a bit I have learned that they really upped the coding knowledge requirements. For example on the button click event  one just gets a click event listener as opposed to a code wizard from flash that normally will do the work.
    I've taught remedial programming at a business college in the past and if I had any advice it would be to commit yourself to learning some beginner coding.
    For this particular product I would focus on strings, objects, events and methods. I have found some free Flash Builder ebooks searching google books or other online free ebook sites. Most of the non-google sites will allow you to download a complete PDF file.  There is much more Flexbuilder 3 content out there than Flash Builder but Flexbuilder 3 is very similar and will help.
    At the end of the day, most of today's RIA tools (Flash Builder, Silverlight etc) are going to require both knowledge in design and coding.

  • FBL5N Review Open and Cleared Invoices per Customer

    WHen one of our users goes into FBL5N to review open and cleared invoices he adds the WBS and the Profit Center. When the report runs it is blank. I looked at the invoice itself and the WBS and Profit center is on the invoice but I don't know why it doesn't show up on the report. Can anyone tell me why this happens? Do I need to make any kind of adjustment before running the report?
    Thanks

    I looked at the VF03 and there is a WBS and Profit Center on the Invoice. If this report shows Open and Cleared invoices then it should bring what is on the invoice in the report but doesn't.
    I had someone email me this response"
    Hi linda,
    For your info, The reason why profit center and WBS element blank in report FBL5N is, this report purposely used to display subledger account.When me made a posting, balance sheet account is not require
    cost object.Only PNL account require cost object.
    Regards,
    Abdul
    I would like to know what other report in SAP shows open and cleared invoices with the Profit Center and WBS?

  • Web design reporter and Report designer is not working in SAP BI

    Hello,
    I am facing JAVA RFC error in Web reporting designing and reporting designer tools in BEx application. For more details please check the attachment in mail  Any one help me for this issue.
    Please check the my system details in the following
    SAP ECC 6.0 EHP 6 with ABAP stack
    SAP BI 740 with ABAP stack
    BO 4.1
    Thanks & regards,
    Surendra

    Hi,
    Check with basis team , either they have configured rfc connection properly or not.
    Refer below also:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0a5216a-349c-2a10-9baf-9d4797349f6a?QuickLink=index&…
    Thanks.

  • Can I use classes and methods for a maintenance view events?

    Hello experts,
    Instead of perform/form, can I instead use classes and methods, etc for a given maintenance view event, lets say for example I want to use event '01' which is before saving records in the database. Help would be greatly appreciated. Thanks a lot guys!

    Hi viraylab,
    1. The architecture provided by maintenance view
       for using EVENTS and our own code inside it -
       It is provided using FORM/PERFORM
       concept only.
    2. At this stage,we cannot use classes.
    3. However, inside the FORM routine,
       we can write what ever we want.
       We can aswell use any abap code, including
       classes and methods.
      (But this classes and methods won't have any
       effect on the EVENT provided by maintenance view)
    regards,
    amit m.

  • Where can I buy a larger hard drive for my late 2008, 15" macbook pro?  From reviewing questions and answers on the support community it would appear that having Apple remove the old and install the new hard drive is recommended.  But how/where?

    Where can I buy a larger hard drive for my late 2008, 15" macbook pro?  From reviewing questions and answers on the support community it would appear that having Apple remove the old and install the new hard drive is recommended.  But how/where?

    Welcome to Apple Support Communities
    You can install the new hard disk yourself if you want to. You just need a 2'5" SATA II hard drive, which is compatible with your MacBook Pro. You can buy one at OWC > http://eshop.macsales.com/shop/hard-drives/2.5-Notebook/ You can filter hard drives by computer, so press a "Click to view all...", choose your computer in the sidebar and it will give you the compatible hard drives.
    There are different brands for the MacBook Pro. The most recommended are HGST and Seagate, which have good reputation. A 7200 rpm hard drive will give you extra performance

  • TS3899 When sending email from the Mail App or through other Apps, my default From: address will change when I enter a To: address.  This sometimes leads me to send the email from the wrong outgoing email account.  It is frustrating and poor design.

    When sending email from the Mail App or through other Apps on my iPad, my default From: address will change when I enter a To: address.  This sometimes leads me to send the email from the wrong outgoing email account.  It is frustrating and poor design, especially since I had already checked the From: address.
    iPad 4 running iOS 8.1.3

    3rd party email addresses have to be deleted on every synmced mac product, although I have 1and1.co.uk and my imac updatetes the mails in that account from mac mail.
    Yahoo etc is a 2 step deleting process but good to get your emails pushed when on the go.
    LJ
    http://www.facebook.com/The.Cowboy.Party

Maybe you are looking for

  • 4:3 event in a 16:9 project

    On a recent trip, I recorded using a digital video camera (4:3) and my iphone 4 (widescreen). I imported the videos from both, and created a 16:9 project. In the events pane, the 4:3 videos have black lines on the left and right, but when I drag them

  • Changing withholding tax base

    Hi Friends, Need your help again. Using T. Code FB09, i can change WHT base as long as the invoice is not cleared. However, how to change WHT base where a particular invoice has been cleared? I have actually made some changes to configuration(OB32) w

  • Won't Initialize

    Hi, I'm trying to install an updated Flash Player, and it won't initialize.  I've disabled my antivirus and removed previous versions.  Any tips?  Is there an older version I should run instead?  I'm running Windows XP and Firefox.  Thanks!

  • FCP HD freezes or unexpectedly quits

    i edit a lot of video of road trips and things that i do with my friends and recently my final cut just started freezing all the time. I noticed that it's doing this a lot when i move something on the timeline and quickly press the spacebar to play i

  • Error in IPAD Firmware Download

    Hello, recently I bought an Ipad (1st Gen) 16GB 3G, and its 4,.0.1, and I tried to download or Download and Update via Itunes, but I got this error message: http://img851.imageshack.us/i/ipadg.png/ My pc: Win7 x64 itunes Latest ( checked ) x64