• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Using javadocs

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm supposed to write a program that interacts with another program that I can't actually see using javadocs. I've been given the UML diagram, the javadocs, and the .class file. The only problem is, I have no idea what I'm doing. I could write the program on my own without too much trouble but I'm supposed to use the code the professor wrote and make my program run that instead. Anyone have any good tutorials on how to do this? I haven't written any code yet so I can't really post anything specific.
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bob Jinkins wrote:The only problem is, I have no idea what I'm doing.


OK, well that's probably the first point to get past. Do you really not know what you're doing, or are you simply overthinking something you haven't tried before?
There's a big difference.

And if you can write a program to do it yourself, then you can certainly write one to use your prof's code; it simply requires exercising some new "brain muscles".

1. The Javadocs will show you the methods that your prof allows you to use; and if he's done his job correctly, they should also tell you how to use each one.
2. The UML diagram should show you graphically what classes and interfaces are in play, and how they relate to each other. I presume you've been shown how to read one; otherwise it might be a little difficult.

My advice: Chill out. Forget everything else, including writing the program, and study the UML diagram. Is there anything specific about it that you don't understand? If so, you might get some answers here.

But if the whole thing mystifies you, then you probably need to talk to your prof and tell him, because it's possible that this is too much for you right at the moment; and it's far better that he knows now than in a couple of months time.

Next: I presume that in addition to the diagram, javadocs and .class file, you have been given a specific set of instructions. Read them over, thoroughly, at least three times; and go through the same exercise: if there's something specific you don't understand, you can try here (and make sure you copy the FULL instruction document if you do); otherwise, if the whole thing is gobbledygook, talk to your prof, because plainly there's a bigger problem than we can help you with.

But don't panic just because it all seems a bit daunting at the moment. Programming is all about breaking big problems down into smaller ones, and many of us have tackled problems that we didn't have the first clue how to solve when we started out.

Take ONE thing at a time.

HIH

Winston
 
Bob Jinkins
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry. I guess I was panicking a bit. Anyhoo, I watched a Youtube video and now I know how to call the methods. My next problem is the UML file my professor gave me. It's an ASTA file which I've never used before and when I opened in with Notepad (not Notepad++ which I use for coding, just regular Notepad), well, to call it gibberish is a bit of an understatement. UML.png Does the ASTA file contain anything I need to make my program run? If not, I can probably finish the project through good ol' trial and error and Googling error messages. Thanks for your help!
 
Sheriff
Posts: 7113
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm guessing here, but the ASTA file is probably a binary file that can only be read by ASTA software. There is a free reader here, but frankly, I'm surprised that your instructor hasn't told you how to read these files. Maybe you missed something?
 
Marshal
Posts: 76416
365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

Look here, where you find that the Comparator interface (bottom of page) has two methods called compare and equals. (Note that is the Java7 version). It tells you what each method does, and you will also find out if you look closely that you can get away without doing anything to equals. At the top of the page it shows examples of how to pass that interface to sort methods. Read that page and become familiar with its structure. You are interested in learning its structure not necessarily understanding all the page, e.g. total ordering. Once you open your ASTA file, you should find it contains documentation with a simlar format, but probably simpler to understand. It is a useful and important skill to be able to open somebody else's classes and use them. It is after all what you do whenever you use one of the 5000 or so classes in the standard JDK.
 
Tongue wrestling. It's not what you think. And here, take this tiny ad. You'll need it.
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic