Assume that a sales man in stationery asks you to write a program to help in managing the books information. Each book has a title, author name, edition no, publisher, ISBN, price. ISBN number is a unique number for each book.
To represent and manage books information in your program, use parallel arrays; array for each piece of information. use a continue menu to enable the user to do the following:
• Add new book to the list. Ask the use to enter the book information. Check if the ISBN is for one of the books in the list display an error message; otherwise add it to the list. Make sure that the list is not full.
• Update book information; prompt the user to enter the book ISBN , then ask the user to enter the other details. Display appropriate message if the ISBN is not valid
• Delete a book; ask the user to enter the ISBN. If the ISBN is valid, display the book information and then ask the user to confirm the deletion process.
• Display a list of all books. Books information should be organized in a table. use formatting manipulators.
• Display the titles of the books which have number of copies less than five.
• Sort books information by title.
• Sort books information by publisher.
• check whether a book is available or not, by ask the user to enter the book title and if it available display book information.
If a SALESMAN approached me and asked for this my reactions would be slightley more vulger then the following:
- "Get back in your cubical before I get the newspaper again! I swear I'll use the Sunday edition if you ever try to tell me how to do my job again!"
- "Yeah tell you what, if you can spell ISBN I'll continue to listen to the rest of this prattle. Heck I'll eat my socks if you can tell me what it stands for with out running to a search engine."
- "My program won't delete anything because you are the last person that should be handeling inventory. (This goes for pretty much all salespeople.)"
- "Do you know what formatting manipulators are? Do you even know what a table is? I'll give you a hint it isn't what your third wife was dancing on when you met."
- "Why only five? Is this as high as they taught you to count at that community college?"
- "Do you mean at the same time? Or one immediatly after the other? Are you even the one I should be talking to? Isn't it more productive for me to be shouting nonsense out my window at people walking by?"
At this point I would walk away because interactions regarding any matter with a sales persons will inevitably lead to confrontations with HR and or police. So your assignment is void as this situation would never happen in real life. Glad I could help :D!
EDIT: Yes my response was a poor attempt at humor but if there is any truth to it remember my third bullet, Salemen should NEVER be given direct control over inventory. These people are the main reason that private members exist in C++. Do NOT allow them access to inventory levels EVER!
Well now not commenting on our sense of humor, no matter how dry it may be, is no way to win us over. You could try appealing to our good nature but that just tells us that you haven't spent too much time around programmers.
EDIT: For productive help, post what you have so far along with the errors or inconsistancies you are seeing and we will help you. For more poor satire keep doing what you are doing.
Samoi, I don't think that anybody here is being rude to you but that application sounds like it would be quite a bit of work to create. Let alone to deploy in the business world bug-free. I don't know nearly enough about coding to even point you in the right direction but I would look up some Youtube videos on database tutorials to get a start with. But I just can't imagine starting an application like this within a day... If this is how your company treats you on a regular basis that is very unfair and you should look for employment elsewhere. I also agree with the notion that a salesman shouldn't be making requests of this nature. If not for anything else that they don't normally and shouldn't have that type of authority over fellow employees...
I know you have a teacher for this. Try ask first about any idea then try to work on your own, if you have problem regarding you code post it here and we are here to help you. I know you can do it. There is saying in programing "divide and conquer" try to analyze one by one.
Use one –dimensional array to solve the following problem. A company pays its salespeople on a commission basis. The salespeople each receive $200 per week plus 9 percent of their gross sales for that week. For example, a salesperson who grosses $5000 in sales in a week receive $200 plus 9 percent of $5000, or total of $650. Write a program (using an array of counters)that determines how many of the salespeople earned salaries in each of the following ranges(assume that each salesperson's salary is truncated to an integer amount):
a) $200-$299
b) $300-$399
c) $400-$499
d) $500-$599
e) $600-$699
f) $700-$799
g) $800-$899
h) $900-$999
i) $1000 and over
[code]"Your code goes here"[/code] frequency[0]=y++; That will not get the desired behaviour. First you assign, then increment.
What is the point of the array if you are going to have that others 9 variables with the same information ? frequency[0]++;
Try to think of a way for transforming the values with arithmetic operations instead of if else