473,383 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Inventory project problem

Is there anyone that can help me finish this project, I'm really frustrated with this project. The area that need to be implemented, im lost on what goes there.
Also project is due 4/03/2007 which is today by 4:30 or 5:00 pm

Expand|Select|Wrap|Line Numbers
  1. ::Full code removed per FAQ::
  2.  
  3. void getData(ifstream& inp, vector<int>& iID, vector<string>& iName, 
  4.              vector<int>& pOrdered, vector<int>& pInStore,
  5.              vector<int>& pSold, vector<double>& manufPrice, 
  6.              vector<double>& sPrice)
  7. {
  8.     int id;
  9.     string name;
  10.     int itemsOrdered;
  11.     double mPrice;
  12.     double sellPrice;
  13.  
  14.     char ch;
  15.  
  16.     // Read the first item info
  17.     inp >> id;                                        // Read item id
  18.     inp.get(ch);                                    // Read a newline
  19.     getline(inp, name);                                // Read item name 
  20.     inp >> itemsOrdered >> mPrice >> sellPrice;        // Read other info of the item
  21.  
  22.     while (inp)
  23.     {
  24.         // continue to read the remaining items
  25.         // ...
  26.     }
  27. }
  28.  
  29.  
  30. void sortData(vector<int>& iID, vector<string>& iName, 
  31.              vector<int>& pOrdered, vector<int>& pInStore,
  32.              vector<double>& manufPrice, 
  33.              vector<double>& sPrice)
  34. {
  35.     // Need to implement ...
  36. }
  37.  
  38. int binSearch(vector<string> list, string searchItem)
  39. {
  40.     //Need to implement
  41. }
  42.  
  43.  
  44. void printReport(const vector<int>& iID, const vector<string>& iName, 
  45.              const vector<int>& pOrdered, const vector<int>& pInStore,
  46.              const vector<int>& pSold, const vector<double>& manufPrice, 
  47.              const vector<double>& sPrice)
  48. {
  49.     //Need to implement
  50. }
  51.  
  52. void makeSale(const vector<string>& iName, vector<int>& pInStore,
  53.               vector<int>& pSold, const vector<double>& sPrice)
  54. {
  55.     // Need to implement
  56. }
Apr 3 '07 #1
14 6029
sicarie
4,677 Expert Mod 4TB
Looks like you need to

1) finish getData()
2) implement sortData()
3) implement binSearch()
4) implement printReport()
and
5) implement makeSale()

Do you have pseudocode for any of these?
Apr 3 '07 #2
Rabbit
12,516 Expert Mod 8TB
This is homework is it not?
Apr 3 '07 #3
This is homework is it not?
yes it is homework.
Apr 3 '07 #4
sicarie
4,677 Expert Mod 4TB
yes it is homework.
Rabbit-

Seeing as how he did post "I'm stumped" I was going to help him with a pseudocode and algorithm for the methods, leave the implementation to him. Once he gets the right algorithm, the coding shouldn't be difficult at all.
Apr 3 '07 #5
Rabbit-

Seeing as how he did post "I'm stumped" I was going to help him with a pseudocode and algorithm for the methods, leave the implementation to him. Once he gets the right algorithm, the coding shouldn't be difficult at all.
C++ program using parallel vectors
Write a program to keep track of a hardware store's inventory. The sore sell various items. For each item in the store the following information is kept: item ID, item name, number of pieces ordered, number of pieces currently in the store, number of pieces sold, manufacturer's price for the item, and the stores selling price. At the end of the week the store manager would like to see a printed report.

The total inventory is the total selling value of all the items currently in the store. The total number of items is the sum of the number of pieces of all the items in the store.

The program must be menu driven giving the users various choices such as checking whether an item is in the store, selling an item and printing the report. After inputing the data, sort it according to the items names. Also, after an item is sold, update the appropriate counts.

Initially, the number of pieces (of an item) in the store is the same as the number of pieces ordered, and the number of pieces of an item sold is zero. Input to the program is a file consisting of data in the following form: ItemID, ItemName, pOrdered, manufPrice, sellingPrice.

Use seven parallel vectors to store the information. The program must contain at least the following functions: one to input data into the vectors, one to display the menu, one to sell an item and one to print the report for the manager.

This is the text file



4444
circular saw
150 45 125
3333
cooking range
50 450 850
4444
cicular saw
7 45 125
4444
cicular saw
150 45 125
Apr 3 '07 #6
sicarie
4,677 Expert Mod 4TB
Ok, so have you picked one to write an algorithm for?
Apr 3 '07 #7
Ok, so have you picked one to write an algorithm for?
Thinks for your concern but you dont have to worry about helping me, every since the beginning of this chapter i was lost so i really dont understand nothing. Thanks!!!
Apr 3 '07 #8
Thinks for your concern but you dont have to worry about helping me, every since the beginning of this chapter i was lost so i really dont understand nothing. Thanks!!!


I'll try to figure something out.
Apr 3 '07 #9
sicarie
4,677 Expert Mod 4TB
The coding really isn't difficult - it's the creating an algorithm to solve the problem that's trouble - understanding what is going on in the code. We can definitely help you with that, if you want...
Apr 3 '07 #10
The coding really isn't difficult - it's the creating an algorithm to solve the problem that's trouble - understanding what is going on in the code. We can definitely help you with that, if you want...

ok you can, but i really dont understand this project. Well i understand the logic but dont know how to code this.
Apr 3 '07 #11
The coding really isn't difficult - it's the creating an algorithm to solve the problem that's trouble - understanding what is going on in the code. We can definitely help you with that, if you want...

what ever you can do i will appreciate.
Apr 3 '07 #12
sicarie
4,677 Expert Mod 4TB
what ever you can do i will appreciate.
Ok, so first you need to pick one of those 5 things.

Then you need to give a simple, one sentence description of what it's going to do.
Apr 3 '07 #13
Was this question ever answered?
Jul 27 '08 #14
Laharl
849 Expert 512MB
If it wasn't, it's certainly well past the OP's assignment deadline, so it's rather a moot point. Thread necromancy is frowned on in most online communities...
Jul 27 '08 #15

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: jason | last post by:
Access 2000: I have a customer-inventory table I need to loop through and compile a list of all the inventory items the customer is tracking. The problem I am finding is that a simple loop...
5
by: gregork | last post by:
I have painstakingly created an excel 2000 workbook for the very complex recipes I have to formulate. I have 2 sheets- 1 for configuring the recipe and 1 that is like an inventory of all the raw...
3
by: smonczka | last post by:
I am trying to locate an inventory template. I have looked at the one that comes with Access but what I need is a little more complicated. We ship boxes of software and the inventory consists not...
4
by: DeepDiver | last post by:
I am developing an inventory database in SQL Server. I realize there are many commercial (as well as some non-commercial) inventory offerings, but my client has specific requirements that would...
13
by: royaltiger | last post by:
I am trying to copy the inventory database in Building Access Applications by John L Viescas but when i try to run the database i get an error in the orders form when i click on the allocate...
3
by: Henrik | last post by:
Hi all, I'm a .net developer working with developing automation equipment for the sawmill industry. The main focus of our product line is mechanical and measurement equipment but our clients...
4
by: Kliot | last post by:
I am trying to update a master inventory table from an order details table, the query below works fine except when the order details table contains the same code number multiple times. When this...
3
by: cblank | last post by:
I need some help if someone could help me. I know everyone is asking for help in java. But for some reason I'm the same as everyone else when it comes to programming in java. I have an inventory...
2
by: pinkf24 | last post by:
I cannot figure out how to add the following: Modify the Inventory Program to include an Add button, a Delete button, and a Modify button on the GUI. These buttons should allow the user to perform...
1
by: jcato77 | last post by:
I need help with a class project I'm working on, Below is my assignment and the code I have currently created. Assignment: Modify the Inventory Program by creating a subclass of the product class...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.