Jump to content

Alright Java jockeys, need some help


Artmageddon

Recommended Posts

I thought it would be smart idea to get a second degree in web development, but found out I suck, and I mean suck big balls at Java. I am a right brained artist, my brain just does not work this way.

I am taking a second level class right now, had a hard time getting motivated to even start the damn class, and now have a lab due tomorrow at midnight, and not sure how to go about completing it.

I have some of the basics done, but it's about a year since I took the intro class. Anyone have a few hours tomorrow afternoon to explain to me some of what I need to do to get this shit done?

Let me know if you think you can help out, We can go over details. Would like to get started no later than 2-3 pm, so I have time to get it done. If you're in C-bus and can meet with me, even better.

I will owe you big time. Thanks!

Art

Link to comment
Share on other sites

Don't feel bad, I'm taking the intro Java class right now. I'm pretty good at it (logic-brained and have some C++ experience), but I doubt I'd be much use if you're in a more-advanced class. If you want, though, I can at least try to help you find info-- I've got a big ole Java book here on the desk. What exactly is giving you trouble? Program organization, actual code, or just plain stuck on where to begin?

Link to comment
Share on other sites

Just plain suck at it.

Actually I'm fairly ok at going through and correcting code that I have a skeleton for. But to just write code from thin air, I'm screwed.

My main problem is I have no interest in it, so I have a hard time sitting down to learn it. I was finally starting to get it a bit at the end of the intro class, took a long break, and have been clueless 3 weeks in to this class.

I've been messing with the lab for the past few hours and some of the basics are coming back, and have it 38% complete, and could probably get about 70% on my own. I've got most of the objects constructed and tested, and I'm quitting for the night.

Basically this is the problem(this is just the written description, there are 6 classes of code and too much post here):

Purpose

To assess your ability to apply the knowledge and skills developed in Module 1 and Module 2. Emphasis will be placed on interfaces and polymorphism.

Introduction

You have been contracted by Acme Manufacturing to develop the first phase of an inventory management system. The system will keep track of inventory lots. There are two different types of lots. One type of lot is a group of parts received from a supplier. The second type of lot is a group of products that have been manufactured at the same time. Parts are used to make products. Products are sold to customers.

The system you are going to design and develop will help Acme Manufacturing keep track of the parts they have in their inventory. When parts are received from a supplier, a receiving clerk adds the parts to inventory in lots. Each lot has a lot number and contains only one type of part, but there may be multiple lots in inventory that contain the same type of part. When parts are used to manufacture products, a production clerk removes the parts from the lots. When all the parts have been used up, the empty lots are deleted from inventory.

When products are manufactured, a production clerk adds the lots of products to inventory. A shipping clerk removes products from inventory as the products are shipped from the factory. Like parts, each lot contains only one type of product, but there may be multiple lots in inventory that contain the same type of product. When all the products in a certain lot have been sold, the lot is deleted from inventory.

Production managers need to know what parts and products are in inventory before scheduling production. A production manager can display a lot or query the inventory status of a single part or product to see if more need to be ordered or manufactured.

Functional Requirements

Adding a Lot

A lot is assigned a number, starting with 1, when it is added to inventory. Lot numbers are not reused. A maximum of 250 lots can be stored in inventory. The method to add a lot must return a Boolean value of true if the lot was successfully added. Otherwise the method must return false.

Deleting a Lot

The method to delete a lot takes the lot number of the lot to be deleted as a parameter and returns a Boolean value of true if the lot was successfully deleted and false if it was not deleted.

Retrieving a Lot

Given a lot number, a specific lot will be returned. If the lot does not exit, the method to retrieve the lot should return null.

Querying the Inventory

Given a part or product id, the total quantity on-hand will be returned. Note that the total may include parts or products from more than one lot.

Removing Parts or Products

Removing a quantity of parts or products from inventory reduces the quantity on-hand in one or more lots. Parts or products are removed from inventory only if the entire quantity is available in inventory. If removing the items from inventory reduces the quantity on-hand to zero, the lot should be deleted from inventory. The method to remove items from inventory takes the part or product number and the quantity as parameters. The method should return a Boolean value of true if the parts or products were successfully removed and false if they were not removed.

Assignment

Your job is to implement the methods specified in the interfaces in concrete classes. You must document and test all classes you implement. A careful study of the functional requirements and documentation in the provided interface classes will direct your efforts. You also may want to examine the javadoc supplied in the folder Lab01Student\doc. You may ask the customer (your professor) for clarification on any of the methods that are imprecisely defined. Any method containing the comment // TODO: Your code here should be modified to perform the task documented in the associated interface. You are responsible for creating any needed instance fields. You also must add comments and update all javadoc to fully and accurately document your implementation. You can create additional methods, as needed, to implement your classes.

Note that some additional classes and interfaces are provided as part of the project. In particular, the Money interface and the concrete implementation Dollar are available for specifying the cost of an item. You can find the javadoc for these interfaces and classes in the folder Lab01Student\jardoc\doc.

Link to comment
Share on other sites

Okay, it's 5:45 and I've been drinking, but lemme do a random-ass stream-of-consciousness read-through and ask a few questions so maybe I'll be able to (possibly) cough up something useful after I've slept--

So, you said you've got most of the objects built and tested- Are you stuffing all this into one class, or maybe one parent and using derived classes for the different types of lots?

Also, I see lots of possible exceptions in the design they're calling for-- has the professor given any clue as to what he wants to have happen if those boolean returns come back 'false', or with the various NULL values possible? If he's wanting lots of error-checking and user-coddling, it's really important not to leave that part till last. In my experience that's much more tedious than the real program desing. If, on the other hand, he just wants error-exit stuff, then no biggie.

It looks like the primary data you'll be handling are: Lot numbers, Part numbers, prices, and item quantities. Really, that's not too bad, just four values to track for each object. Most of the mutator methods can be handily stepped-through with simple 'if' statements to make sure the right changes get made, so no need for anything terribly fancy there.

The accessor methods are similarly straightforward. It looks to my mildly-inebriated eye that, as long as you can keep your data neatly separated, the actual processing is not bad at all. The more I think about it, the more I think you need a couple of derived classes-- the better to keep things organized, at any rate.

Also, were any specifications given about the required GUI? That's the newest material for me, so it's where I would be least helpful (and where I'd spend most of my time if I were assigned this tomorrow). Figuring out a clean way to have everything on one big shiny JFrame would be my first attempt- let the event handler shunt everything into the right class based on where the user puts in the input (ie, if they start by entering data into the 'part number' field, it automatically starts grabbing args for the 'parts' class CTOR-- maybe with a set of mutually-exclusive radio buttons to determine whether you're creating/ modifying/ accessing a lot).

Of course, that would just be my approach since my n00b self doesn't know how to do tabs or multiple screens yet-- maybe you've covered that. Like I said, I'm only in my first Java class right now, so I may be a long way behind your thinking on this stuff.

I'm well aware that this post is probably incoherent/ useless amateur gibberish-- like I said, I've been drinking, it's ok to laugh. I'm just the first one to show up in this thread, so I'm doing my best. But if you answer some of my questions/ comments (if you haven't totally finished the thing by the time you get around to it), maybe the act of answering will get your brain moving in the right direction. Or, possibly, answering the questions will highlight the specific areas where you need help, and either I or someone who actually knows what they're talking about can come up with something at that point.

Blah blah blah, I think I need to get some sleep. This will probably be a fucking hilarious read when I wake up and go "what the hell was I trying to say?!?!?!" :p

Good luck, I'll check on here and see what's what when I get up.

Link to comment
Share on other sites

I got excited cause I thought you wanted advice on what coffee to buy at krogers and brew at home instead of paying for it at starbucks or something... oh well

I thought the exact same thing.... :D damn you computer geeks and your teasing jargon....

Link to comment
Share on other sites

I wish I could help you, Art. But I never got a start in Java. I code a lot of older languages. Not that I couldn't do it, but it would take way too long.

Maybe shoot a plea for assistance to RC51? I think he said he was pretty deep into web design/development. He might be a Java person.

Link to comment
Share on other sites

Sounds like you'll be doing some "if" and "else if" statements, maybe try a "while loop" or 2 if you want. I'd atleast get started in your environment that you use. Netbeans is a good one; what do you use? I'd just start declaring some variables, a scanner class, etc and get it going and make corrections as you get errors or as you start moving along. I noticed it helps a lot to see my progress in action by constantly running my program and making corrections. I'm a firm believer of never just sitting there staring at a blank screen or paper. Start doing the basics and trying things out and eventually it will just come to you and you'll have that bright light bulb over your head for a few hours.

Keep us updated on your progress.

Also, http://java.sun.com/j2se/1.5.0/docs/api/ will help you with the many classes that java has if you need help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...