CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2012
    Posts
    33

    If you know Java .. then solve this question !

    Well, here you are the question... let's see who will solve it

    Code:
    Objective: 
    Write a program that defines and uses a variety of classes. 
    
    Title of the project
    
    Inventory Management System (IMS)
    
    General description: 
    This project is aimed at developing simple Inventory Management System (IMS) for a store. This system can be used to store the details of the inventory, update the inventory based on inventory operations. This system will be used by the store manager for performing functions such as adding new items to the inventory, changing the price of an item etc). Design your program classes making  the store to contain list of item categories, and each category containing list of different items. So that the program will have at least three classes Store class, Category class, and Item class.  Implement the classes you decide on, and then use them to write a program that behaves as described below. You should end up with the Store class whose main method behaves as described, and probably some other classes as well. Test the program until you are satisfied that it works. 
    
    Detailed description of program classes:
    
    	Store Class:
      the class store contains list of item categories 
    •	Data members :
               - private String storeName (the name of the store)
               - private Category[] categories (the Items in the store)
               - private int size (the maximum number of categories)
               - private int count (the current number of categories)
    Constructor :
        - public  Store (String name,int size);
    •	Methods :
       - public void addCategory(Category g ) 
             Adding the category to the store (in the list categories in the store);
    - public void removeCategory(String name );
    - public void showAllItems();
    Showing all  items data for all categories. 
    - public void showItemsInCategory( String CategoryName);
    Showing all items data for particular category specified by its name..
    - public int findCategory(String  CategoryName);
     returns category index where it found in the categories list or returns -1 if not found.
    - public void importItem();
    - public void sellItem(); 
    
    	Category Class:
      the class Category contains list of items .
    •	Data members :
               - private String CategoryName (the name of the category)
               - private Item[] items (the Items in the category)
               - private int size (the maximum number of items)
               - private int count (the current number of items)
    Constructor :
        - public  category (String name, int size);
    •	Methods :
       - public void addItem(Item i )
     
             Adding the item to the category  (in the list items in the cateogry)
    -	public void removeItem(int itemNo ).  
    -	public void showItems().
    -	public void sortItemsByNo();
    -	public void sortItemsByName();
    -	public int findItem(int itemNo). 
    	Item Class:
      the class Item  contains item attributes .
    •	Data members :
    - private int no.
    - private String name.
    - private int quantity.
    - private float price.
    Constructor :
    - public Item(int no,String name,int quantity,float price).
    •	Methods :
    - public void changeQuantity(int amount);
    - public void print().
    - public void changePrice(float newPrice);
    - public int getNo();
    - public String getName();
    
    Instructions: 
    
    1.	The inventory manager should be able to 
    
    •	Import new items/categories to the inventory (‘grape’ may be added to the category ‘fruits’ or a new category such as ‘vegetables’ may be added)
    
    •	Change the price of an item
    
    •	See the status of the inventory, ie, whether a particular item is available or not etc
    
    •	Search for a particular item by typing the initial letters (‘app’ for example may bring up the item ‘apple’ in the top) or by category-wise (apple, for example, may be looked up by going through the category ‘fruits’) 
    
    •	Inform the inventory manager about the items that are not available, so that they can be stocked
    
    •	Sort item data according to item no, or item name.
    
    The program must show a main menu showing the main inventory operations.
    
    1. Manage item , This option is showing mange item data menu for manipulating item data as shown below, 
    2. Import item , This option is used to add a new quantity for particular item
    3. Sell item, This option is used to sell  a specific quantity for particular item
    4. Exit
    
    
    Manage item data menu
    1.	Add new category.
    2.	Delete category.
    3.	Add new Item.
    4.	Delete Item.
    5.	Change price
    6.	Search for item.
    7.	Show All items for All categories.
    8.	Show All items for particular category.
    9.	Sort item  by item Id
    10.	Sort item  by item name.
    11.	return to the main menu
    I want to see who can even think about it...

    PS: i am almost new at Java, so take it easy

    Thanks

  2. #2
    Join Date
    May 2006
    Location
    UK
    Posts
    4,473

    Re: If you know Java .. then solve this question !

    OK so that's your homework which we aren't going to write for you.

    If you show you've made an effort and explain where you are stuck we will help you.
    Posting code? Use code tags like this: [code]...Your code here...[/code]
    Click here for examples of Java Code

  3. #3
    Join Date
    Apr 2012
    Posts
    33

    Re: If you know Java .. then solve this question !

    Quote Originally Posted by keang View Post
    OK so that's your homework which we aren't going to write for you.

    If you show you've made an effort and explain where you are stuck we will help you.
    Well, it's not a homework.. but it's a question i got it from a friend and if someone can solve it.. i'll be very thankful

    I hope you got it.. i know that i must do some efforts but i tried v=beofre .. and i learn from these questions by the way to make better in another.

    Thanks

  4. #4
    Join Date
    May 2009
    Location
    Lincs, UK
    Posts
    298

    Re: If you know Java .. then solve this question !

    Quote Originally Posted by iCoder View Post
    Well, it's not a homework.. but it's a question i got it from a friend and if someone can solve it.. i'll be very thankful
    That's not a question... it definitely looks like homework to me. If we give you the solution you (or your "friend") will not learn, and presenting any solution we could give you as your own work would also be cheating. Show the effort you say you have done and we will help you.

  5. #5
    Join Date
    Apr 2012
    Posts
    33

    Re: If you know Java .. then solve this question !

    Quote Originally Posted by jcaccia View Post
    That's not a question... it definitely looks like homework to me. If we give you the solution you (or your "friend") will not learn, and presenting any solution we could give you as your own work would also be cheating. Show the effort you say you have done and we will help you.
    Well, so if i try and do something... could you please make it better ? and write the missed codes?

    Thanks and i'll try and post here..

  6. #6
    Join Date
    Nov 2011
    Posts
    189

    Re: If you know Java .. then solve this question !

    Ok..look: the ideea is very simple- make a folder called categories, inside that
    Make the category folders(apples,tuna boxes etc) and inside each folder make several text files reprezenting your products (majestico tuna). From now on all you have to do is add and edit things such as price and left in stock directly in the txt file. Making a friendly ui is your job though... Have fun

  7. #7
    Join Date
    Apr 2012
    Posts
    33

    Re: If you know Java .. then solve this question !

    Quote Originally Posted by cens View Post
    Ok..look: the ideea is very simple- make a folder called categories, inside that
    Make the category folders(apples,tuna boxes etc) and inside each folder make several text files reprezenting your products (majestico tuna). From now on all you have to do is add and edit things such as price and left in stock directly in the txt file. Making a friendly ui is your job though... Have fun
    ok, let me try and see...

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured