Results 1 to 6 of 6
  1. #1
    jevinder is offline Member
    Join Date
    Dec 2008
    Posts
    3
    Rep Power
    0

    Default an inventory/accounting system using java?

    Hi,
    First let me introduce myself.

    I am a complete noob to java. I have done an OO programming course which used java, and i struggled on it because i had no experience of java. i spent hundreds of hours going through coding by trial and error to complete assignments which i eventually did ok on, but the terminology hasn't stuck nor has the principles! But what i have done is variables, methods, selection, iteration, classes, sub-classes, inheritance,creating objects, dealing with arrays, sets, maps and lists, etc.

    However, from my limited experience, I think that Java is probably the best way to undertake a project that i have, but what i'm wondering is - does something already exist - either open source or paid-for packages?

    if not can somebody give me some advice if this really is the best way. Or, if there are any other software packages that will do the job. I have come across some accounting/inventory control packages for manufacturing companies, (which are expensive) but I would like something a lot simpler which would be customised to my needs.

    The project is buying blank cd's, cases, labels, etc. manufacturing various cd box sets - single cd's, 2cd packs, 3 cd packs, 4 cd packs, etc, then eventually selling the box sets.

    What I need to do is to record the purchases of each of the consumable items - blank discs, cases, etc. increasing stock levels and values of each consumable, then when i create a product - such as a 4cd box set, for example, I would decrease the consumable levels by the amount used to make each product, and then increase the stock levels of the individual product. Then when I sell that product, to decrease the stock level of that product.

    So for example:
    Purchase 100 blank discs - increase stock level & values of discs by 100.
    purchase 100 labels - increase stock levels & values of labels by 100
    purchase 50 cases - increase stock levels & values of cases by 50.

    manufacture 20 of 'product a (1 disc, 1 case)' - increase stock levels of 'product a' by 20
    but also... decrease stock level and values of discs by 20, of labels by 20 and cases by 20.

    Then when i sell, say 2 product a's, decrease the stock level and values of the number of product a's i have.

    The program should also enable me to:
    look up and check the stock level and value of anything at anytime,
    add new consumables,
    add new products - by inputting name, etc, number to be added and also what consumables are used to create that product, so then when I manufacture more of the product, it automatically decreases the stock level of consumables used, etc.
    give a summary of how many of each product has been manufactured and sold,
    give a summary of how many of each consumable has been ordered, and how many converted into products.

    The system is not simply 1cd to 1 case, but there will also be 2cd's in a 2cd case sets, 3 and 4 cd's in a 4 cd case, and 5 or 6 cd's in a 6 cd case set.
    So there will be, in total, about 5 different types of cases, blank cd's, blank dvd's, labels, sheets of paper (to print case sleeves on).
    And then, eventually hundreds of different products comprising of different quantities of each.

    It would also be good if it could be in a windows type interface, or in html.
    Would it have to also have access to a database, or can the program just add to arrays or lists or sets or whatever to keep track of everything?

    I've probably bitten off more than i can chew with this, but I'm sure that OO programming is the best way to do this.

    I'd appreciate any help/advice you can give.

    Cheers,
    Jev

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    kind of sounds like an accounting system for pirating music. :rolleyes:

  3. #3
    jevinder is offline Member
    Join Date
    Dec 2008
    Posts
    3
    Rep Power
    0

    Default

    ha ha,

    no, what it is - we record the sermons in our church, and i am putting them onto cd and also creating box sets of various messages to sell.

    cheers,
    Jev

  4. #4
    xcallmejudasx's Avatar
    xcallmejudasx is offline Senior Member
    Join Date
    Oct 2008
    Location
    Houston, TX & Flint, MI
    Posts
    609
    Rep Power
    7

    Default

    eh pirating music, pirating sermons; whatever floats your boat(or Ark).

    I'm just curious why you purchase 100 disks and labels but only 50 cases? Do the cases hold 2 disks?

    This project isn't as difficult as you may think. Before you start connecting it to a database and creating a GUI view for it get it working through the little black box of awesome. If I were doing this project I would probably start by pseudo-coding some of the major tasks, ie:
    Java Code:
    public purchaseStock(int numberOfCDs){	
    	numberOfCases = Math.ceil(numberOfCDs/2); //Round up in all cases
    	numberOfLabels = numberOfCDs;
    	updateInventory(numberOfCDs, numberOfCases, numberOfLabels);	
    }
    
    public updateInvetory(int numberOfCDs, int numberOfCases, int numberOfLabels){
    	totalCDs += numberOfCDs;
    	totalCases += numberOfCases;
    	totalLabels += numberOfLabels;
    }
    that was going to be pseudo-code but meh that was easier.

    I can see using OOP to do this but I don't see how that was the first thing you jumped too. I don't really see this program using inheritance or polymorphism(encapsulation yes). The only real Object I can imagine you using would be maybe a Package object that consists of caseType and some boolean hasDVDExtras field.

    Sorry I'm babbling and typing as thoughts come to me. Overall this seems like a good project and once you break it down and start coding it will come together alot easier.

  5. #5
    jevinder is offline Member
    Join Date
    Dec 2008
    Posts
    3
    Rep Power
    0

    Default

    Quote Originally Posted by xcallmejudasx View Post
    I'm just curious why you purchase 100 disks and labels but only 50 cases? Do the cases hold 2 disks?
    That was just an example - I have purchased various quantities of discs and cases

    Java Code:
    public purchaseStock(int numberOfCDs){	
    	numberOfCases = Math.ceil(numberOfCDs/2); //Round up in all cases
    	numberOfLabels = numberOfCDs;
    	updateInventory(numberOfCDs, numberOfCases, numberOfLabels);	
    }
    
    public updateInvetory(int numberOfCDs, int numberOfCases, int numberOfLabels){
    	totalCDs += numberOfCDs;
    	totalCases += numberOfCases;
    	totalLabels += numberOfLabels;
    }
    that's helpful thanks

    I can see using OOP to do this but I don't see how that was the first thing you jumped too.
    My thinking is that i would have several 'consumable' objects such as:
    Cds, labels, 1cd case, 2cd case, 4cd case, etc
    each with variables of qty, purchase price, cost of 1

    then i would have the 'product' objects, each with the variables of:
    name, type, price, qty

    and 'product type' objects such as:
    1cd boxset, 2cd boxset, 3cd boxset
    each with the variables of:
    number of labels used to make, numb. of cds used to make, type of case used, wether or not the case has a sleeve, and price.

    so say for example that i manufacture a new product - i will be able to give it a name, the price, the qty i made, and the type it is - which if it is a 2cd boxset, then it will know that to make it will use 2 cds, 2 labels, a 2cd case, and an insert sleeve. and so each of those quantities (multiplied by the qty of boxsets i make) will then be deducted from the consumables stock.

    Does that clarify things?
    Jon

  6. #6
    xcallmejudasx's Avatar
    xcallmejudasx is offline Senior Member
    Join Date
    Oct 2008
    Location
    Houston, TX & Flint, MI
    Posts
    609
    Rep Power
    7

    Default

    Quote Originally Posted by jevinder View Post
    That was just an example - I have purchased various quantities of discs and cases



    that's helpful thanks



    My thinking is that i would have several 'consumable' objects such as:
    Cds, labels, 1cd case, 2cd case, 4cd case, etc
    each with variables of qty, purchase price, cost of 1

    then i would have the 'product' objects, each with the variables of:
    name, type, price, qty

    and 'product type' objects such as:
    1cd boxset, 2cd boxset, 3cd boxset
    each with the variables of:
    number of labels used to make, numb. of cds used to make, type of case used, wether or not the case has a sleeve, and price.

    so say for example that i manufacture a new product - i will be able to give it a name, the price, the qty i made, and the type it is - which if it is a 2cd boxset, then it will know that to make it will use 2 cds, 2 labels, a 2cd case, and an insert sleeve. and so each of those quantities (multiplied by the qty of boxsets i make) will then be deducted from the consumables stock.

    Does that clarify things?
    Jon
    Ya that clears things up a bit. This seems fine and you should definitely start from the bottom up with this. Create the simple objects first and work with those. Once you can successfully work with an inventory like that it's just a few extra lines of code to take a package object that updates each field.

Similar Threads

  1. How come it does not display the inventory
    By sparkyii in forum New To Java
    Replies: 1
    Last Post: 10-29-2008, 03:24 PM
  2. Help with Errors in Inventory Program
    By ljk8950 in forum AWT / Swing
    Replies: 3
    Last Post: 08-09-2008, 12:49 AM
  3. Java Inventory Program Part 3
    By ljk8950 in forum New To Java
    Replies: 18
    Last Post: 07-28-2008, 06:47 AM
  4. Inventory part 2 help please
    By badness in forum New To Java
    Replies: 1
    Last Post: 12-12-2007, 08:51 AM
  5. Inventory program
    By Nexcompac in forum New To Java
    Replies: 3
    Last Post: 07-27-2007, 06:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •