# Data Structures Assignment

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

• 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

--------

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.

( 2 reviews ) Irvine, United States

Project ID: #5062862

## 38 freelancers are bidding on average \$24 for this job

vano101

Hello. I'm C++ expert and I've completed many similar assignment on this site. And I'm able to complete your assignment in few hours.

\$23 USD in 1 day
(600 Reviews)
6.9
samitXI

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 More

\$35 USD in 1 day
(108 Reviews)
6.9
akhila27

Thank you very much for the detailed description. We can do this Invoice application for you and we know exactly what you want. If you go through our projects, you will see many similar projects. Contact us for more More

\$105 USD in 3 days
(20 Reviews)
6.5
dobreiiita

Hi, I am C++ expert and can surely help you with this project. Please let me know if you are interested. Thank you

\$23 USD in 1 day
(158 Reviews)
6.4
szymszteinsl

Nie złożono jeszcze oferty.

\$30 USD in 3 days
(22 Reviews)
5.9
it2051229

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 [url removed, login to view] and I would like More

\$30 USD in 0 days
(140 Reviews)
5.8
ranganathp

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... More

\$100 USD in 3 days
(5 Reviews)
4.7
rakib062

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 an More

\$35 USD in 2 days
(28 Reviews)
4.8
ramyrafik

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 avai More

\$14 USD in 0 days
(19 Reviews)
4.6
lokjaiswal12

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.

\$20 USD in 0 days
(30 Reviews)
4.5
iit2009013

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 More

\$20 USD in 0 days
(13 Reviews)
4.5
Venky117

A proposal has not yet been provided

\$25 USD in 1 day
(17 Reviews)
4.2
manhpham

Hi there. I am senior developer from Vietnam. I have been working on this site for 2 years. I am interested in your [url removed, login to view] let's me help you.

\$40 USD in 1 day
(16 Reviews)
3.8
nkigen

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

\$25 USD in 3 days
(11 Reviews)
3.6
dibyajyotidash

Hi , I have very strong programming skills ,better experience ,I can do your job withn a feasible time frame with better solution. I am ready to start now....... Regards, [url removed, login to view]

\$55 USD in 3 days
(3 Reviews)
2.8
expertatwork

Hey,we can do this in Java... please let us know if you are interested. thank you. please reply.....................................:)

\$25 USD in 3 days
(4 Reviews)
2.8
ahmedabdallah1

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, a More

\$25 USD in 1 day
(6 Reviews)
2.5
goswamiarpit475

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, prog More

\$22 USD in 1 day
(3 Reviews)
2.3
vanpham

A proposal has not yet been provided

\$15 USD in 1 day
(1 Review)
0.1
thperfectpunk

A proposal has not yet been provided

\$15 USD in 3 days
(0 Reviews)
0.0