a program that keeps track of all the articles in the stock

  • 7aRamiYeh
  • Born
  • Born
  • No Avatar
  • Joined: Mar 28, 2004
  • Posts: 1
  • Status: Offline

Post March 28th, 2004, 10:23 am


A company has a warehouse that contains several different types of article, and there may be several different examples of each article in stock. The following information will be interesting to know for each article: the article identification (a code of four characters), the article description (at text with at most 30 characters), the number of article of particular kind in stock, and the sales price. Write a class Article that defines the articles.
You need a program that keeps track of all the articles in the stock. Write a program that first reads in this information about the articles and places the information into an array with elements of type Article. (Assume that there are no more than 1000 kinds of article in the warehouse.) Input can terminate when, for example, the article definition ‘0000’ is given. The program will then repeatedly read commands from the terminal and perform the tasks required. The different commands are as follows, where xxxx stands for an article definition code:

info xxxx write out all current information about article xxxx
sell xxxx n register that n items of article xxxx have been sold.
buy xxxx n register that n items of article xxxx have been put
into the store.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 28th, 2004, 10:23 am

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23407
  • Loc: Woodbridge VA
  • Status: Offline

Post March 28th, 2004, 11:28 am

Looks like an interesting homework assignment - good luck with it!
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 134 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.