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



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


• 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


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.

Skills: C Programming, C++ Programming, Engineering, Software Architecture, Software Testing

See more: use of data structures, structures data, sample thank you notes, programming structures, programming definitions, programming data structures in c, programming and data structures, first investors, define total cost, define data structures in c, data structures programming, data structures in programming, data structures in c notes, data structures c, data structures and programming, c programming structures, c programming data structures, architecture define, 0 1 integer programming, structures, stock shares, samantha, samantha a, only 15 lines sample, help e w

About the Employer:
( 2 reviews ) Irvine, United States

Project ID: #5062862

38 freelancers are bidding on average $24 for this job


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)

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)

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)

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)

Nie złożono jeszcze oferty.

$30 USD in 3 days
(22 Reviews)

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)

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)

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 I assure you of clean, efficient code with proper comment an More

$35 USD in 2 days
(28 Reviews)

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)

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)

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)

A proposal has not yet been provided

$25 USD in 1 day
(17 Reviews)

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)

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)

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)

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)

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)

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)

A proposal has not yet been provided

$15 USD in 1 day
(1 Review)

A proposal has not yet been provided

$15 USD in 3 days
(0 Reviews)