Write a program that computes an invoice for purchasing shares of stock.
A brokerage company has implemented policy to encourage investors to buy shares in even lots of
100. Therefore, the minimum order is 100 shares of stock. The commission charge for the first 100
shares is $2.55. An additional commission of 2 cents per share is charged for all shares over 100
shares.
Requirements:
The program must:
• Define an integer constant that holds the minimum number of shares that can be ordered.
• Define two floating point constants that will hold:
o The minimum order commission
o The commission for each share over the minimum order
• Define a string constant for the investor’s name – use YOUR name
(e.g., "Samantha Washington")
• Define two character constants for the investor’s initials – use YOUR initials
(e.g., 'S' and 'W')
• Define an integer variable to store the total number of shares purchased (read from the
user)
• Define an floating point variable to store the cost of one share of stock (read from the user)
• Define two floating point variables to store parts of the total cost.
o The cost of all shares ordered
o The commission charged for additional shares over the minimum order
• Display a program description, followed by several prompts and input statements to read
the total number of shares purchased from the user, and the price per share.
o You may assume that the number of shares entered by the user will always be at least
as many as the minimum order requirement
Sample Input
Stock Purchase Invoice Program
Enter number of shares purchased: 176
Enter the price per share: 4.39
• Calculate the three parts of the total cost.
• Add all of the above costs together to determine the total bill.
• Add any other variable definitions or calculation statements you think are needed to perform
the task
• Output statements to display the results to the console, in the following format:
Investor: Samantha Washington (SW)
Shares purchased: 176
Price per share: 4.39
Cost for all shares 772.64
Commission for minimum order 2.55
Commission for additional shares 1.52
--------
Total Billed to Investor Account: 776.71
NOTES:
o Display a few blank lines to separate the input from the output.
o The dollar figures in the totals column should all line up on the decimal point.
o If only the minimum number of shares is purchased,
the commission for additional shares will be 0.00.
Thank you for your help and I hope to hear from you soon.
Hi, I am placing my bid on your project because I have read the requirements and I am confident enough with my Java skills. I am focused mostly on doing computer science homework here in freelancer.com and I would like to help you get this project done if you would give me the opportunity. I am a computer science professor and practitioner and this assignment is one of the fields that I teach very well so I can assure you an accurate result.
Hi Sir,
I am ready to work for you.I have 9 years of experience in C/C++ , java, PHP and, MySQL. please see some of my works also check my reviews you will get better idea about my skill.I deliver quality work within time
frame. Please visit my profile once.
Thanks with regards,
Amit
Can help... I am an Expert...
Please start a Discussion with me and we can get started from there...
Please check the past projects I have handled and check my reviews for what employers have to say about my work... Can start right now...
Hello, I'm an expert C# developer. I read and understood your requirements. I can prepare a Console Application coded in C# to do the requirements. I'll comment the Code so it's easy for you to understand. I'll be available for you to test the application.
Hey,
i am a postgraduate student in computer science , this is an easy task for me and i can provide you the solution in minimum time and minimum complexity using all the concept of data structure and algorithms, program will be well commented and modular so that you can easily understand the functionality.
eagerly waiting for ur reply.
Thanks
Arpit
Hi! I can complete this for you, and provide you the codes within an hour. I am proficient in C and C++. I can do it it any of them, just let me know in what language you need the code to be. Please let me know, and I will finish this within an hour. Thank You!
Hello,
I understood all the requirements. I can do this assignment. You can check my reviews, I have done many of this kind assignments. I will finish it within 4 hours.
Hi,
I am a graduate in CS and working as a C++/Java programmer for 3+ years. I have done lots of assignments both in academic courses and in freelancer.com. I assure you of clean, efficient code with proper comment and documentation.
thanks
Hello, I'm Ahmed Abdallah a fourth year student at computer and systems engineering department
at Alexandria university. I'm a java expert (3+ years of experience). I'm very good at android, C/C++,
data structures, algorithms and OOP concepts. I can do this job in few minutes. We may contact via skype. PM for more details. Let's start right now.
I am an MSc. Comp Science final year student with excellent knowledge in Data Structures and Algorithms as well as programming. Im looking foward to working with you
I am really good at c programming.I have completed my engineering i will finish the program within 2 to 3 days.i have a certification in C.i could really help you out with this assignment
Hi,
I'm a 17-year-experienced C++ Engineer and also TEACHER of C++ and related topics.
Can do this for you within 1 hour and send it to you.. :)
Best wishes.
D
Hi, I am new to Freelancer.com and I would like to start with some easy projects in orde to start building some (positive) history. I can finish this project very quickly (and make it to compile in Linux and Windows). You would have to give me the details about the OS needed as well as which libraries must be used/not used.