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

  • 7aRamiYeh
  • Born
  • Born
  • 7aRamiYeh
  • Posts: 1

Post 3+ Months Ago


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.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23458
  • Loc: Woodbridge VA

Post 3+ Months Ago

Looks like an interesting homework assignment - good luck with it!

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 44 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
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.