Login|Contact Us
Question and Answer

Programming

Ask a Programming Question, Get an Answer ASAP!

  • Ask A Question
  • Browse Answers
  • Meet The Experts
  • How JustAnswer Works

Purpose: To become familiar with the If-Then-Else structure

 
Arty's Avatar
  • Answered by:Arty
  • Computer Software Engineer
  • Positive Feedback: 99.2 %
  • Accepted Answers: 353
Verified Expert
in Programming

Recent Feedback

Positive
Excellent work as always.
Positive
Provided a well-written thorough response that helped me easily understand.
Positive
Quick response. Was very patient with me and explained what I was doing wrong.
Positive
Great work!
Positive
Hey thanks a lot it compiles and runs well.
Positive
Quick and accurate :)
Positive
Awesome!!
Positive
Very quick and professional. Great service!
Positive
a very intelligent man
Positive
Good job

Customer Question

Purpose: To become familiar with the If-Then-Else structure and methods used to determine a stockbroker's commission.

Problem:I have to write a top down program that will read a stock transaction and determine the stockbroker's commission. Each transaction includes the following data: the stock name, price per share, number of shares involved and the stockbroker's name.




this is the output report how my work should appear

Stockbrokers's Commission
Stock Price Number Stockbroker Commission
Name per share of Shares Name
----- -------- -------- ------ ----------
Amoco 56.25 250 Guinn, M. 70.00
PnWbrins 14.88 300 Myers, I. 51.00
Ekodak 61.38 250 Banks, W. 70.00
Chrysler 44.25 150 Lucas, T. 42.00
McDnInvs 17.38 115 Lucas, B. 29.33
McDonals 54.38 200 Dixon, D 56.00

Total Commission Earned 318.33

End of Report

 



Already Tried:
I put information in but not coming out correctly

Submitted: 254 days and 21 hours ago.
Category: Programming
Value: $69
Status: CLOSED

Accepted Answer

Picture
Expert:  LogicPro replied 254 days and 21 hours ago.


LogicPro :

Hi

LogicPro :

Welcome to JustAnswer

LogicPro :

Could you elaborate a little more?

LogicPro :

Which programming language are you using?

Customer :
Customer :

qbasic

Customer :
LogicPro :

Opting out for other experts to answer as I am not aware of qbasic. Not sure why you rated it as poor service as I never provided the answer nor you gave me the chance to reply

Customer :

Expert TypeComputer Software Engineer
Category: Programming
Pos. Feedback: 99.4 %
Accepts: 5549
Answered: 7/29/2012

Experience: Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

Ask this Expert a Question >
Customer replied 254 days and 12 hours ago.

Relist: Incomplete answer.

Picture
Expert:  Arty replied 254 days and 10 hours ago.

I can do it in qbasic, but it will be completed only in 8 hours. Please let me know is it okay?

If you already have some code, please upload it to http://wikisend.com and post link here. I'll be able to check why it is not working.
Regards, Arty
Arty41119.9280207523

Customer replied 254 days and 10 hours ago.

I need the answer in qbasic but by 8 am

Picture
Expert:  Arty replied 254 days and 9 hours ago.

What is your local time right now?

Customer replied 254 days and 9 hours ago.

7:20 pm

Picture
Expert:  Arty replied 254 days and 9 hours ago.

How the program should get the input data (ask user for input or read from file)?

After you provide the above information, just leave it and check my answer at 6am.
I will attach the program in my next reply when done. And there is some time to answer if you would have more questions....
Regards,
Arty
Arty41119.9844030093

Customer replied 254 days and 9 hours ago.

it should read the stock transaction an then determine the rest price stock name etc. the stockbroker is computed if the price per share P is less than or equal to $40.00 the commission rate is $0.17 per share ; if if P is greater than $40.00 the commission is $40.28 per share . If the number shares sold is less that 125 the commission is 1.5 times the rate per share.


Each detail line of output to printer is to include the stock transaction data set and the commission paid the stockbroker . test the stock name for the EOF. Print the total commission earned

Picture
Expert:  Arty replied 254 days and 9 hours ago.

I see your initial initial requirements. I am asking for clarification.

"it should read the stock transaction" - do you have an example of input data (I mean stock transaction)?

Is it should be read from keyboard or from file?

Customer replied 254 days and 8 hours ago.

Input data


Stock Price Number of Stockbroker


name per share shares name




Amoco $56.25 250 Guinn, M.



PnWbrins 14.88 300 Myers, I.


EKodak 61.38 250 Banks, W.


Chryler 44.25 150 Lucas, T.


McDnInvst 17.38 115 Lucas B.


McDonald's 54.38 200 Dixon, D.

Customer replied 254 days and 6 hours ago.

i need help when will it be

Customer replied 254 days and 5 hours ago.

Must be in qbasic

Purpose: To become familiar with the If-Then-Else structure and methods used to determine a stockbroker's commission.

Problem:I have to write a top down program that will read a stock transaction and determine the stockbroker's commission. Each transaction includes the following data: the stock name, price per share, number of shares involved and the stockbroker's name.




this is the output report how my work should appear

Stockbrokers's Commission
Stock Price Number Stockbroker Commission
Name per share of Shares Name
----- -------- -------- ------ ----------
Amoco 56.25 250 Guinn, M. 70.00
PnWbrins 14.88 300 Myers, I. 51.00
Ekodak 61.38 250 Banks, W. 70.00
Chrysler 44.25 150 Lucas, T. 42.00
McDnInvs 17.38 115 Lucas, B. 29.33
McDonals 54.38 200 Dixon, D 56.00

Total Commission Earned 318.33

End of Report

 


it should read the stock transaction an then determine the rest price stock name etc. the stockbroker is computed if the price per share P is less than or equal to $40.00 the commission rate is $0.17 per share ; if if P is greater than $40.00 the commission is $40.28 per share . If the number shares sold is less that 125 the commission is 1.5 times the rate per share.



Each detail line of output to printer is to include the stock transaction data set and the commission paid the stockbroker . test the stock name for the EOF. Print the total commission earned

 

 


Picture
Expert:  dmoola replied 254 days and 2 hours ago.

I've uploaded the solution to http://danielkenneth.com/untitled.zip

Customer replied 254 days ago.

it has error on too many lines output should be like this




this is the output report how my work should appear

Stockbrokers's Commission
Stock Price Number Stockbroker Commission
Name per share of Shares Name
----- -------- -------- ------ ----------
Amoco 56.25 250 Guinn, M. 70.00
PnWbrins 14.88 300 Myers, I. 51.00
Ekodak 61.38 250 Banks, W. 70.00
Chrysler 44.25 150 Lucas, T. 42.00
McDnInvs 17.38 115 Lucas, B. 29.33
McDonals 54.38 200 Dixon, D 56.00

Total Commission Earned 318.33

End of Report

Picture
Expert:  Arty replied 253 days and 21 hours ago.

Here is my code. Please download and test it.

Regards,
Arty
Arty41120.4606931713

Customer replied 253 days and 21 hours ago.

do not see answer

Picture
Expert:  Arty replied 253 days and 21 hours ago.

I updated my comment, please check it once again.

Picture
Expert:  Arty replied 253 days and 21 hours ago.

alternative location: http://wikisend.com/download/678606/STOCK.zip

Customer replied 253 days and 21 hours ago.

it runs but it is coming up $0.00 no words for stock name etc and and says line 7 file not found

Picture
Expert:  Arty replied 253 days and 21 hours ago.

You should unpack both files 'stock.bas' and 'stock.txt' and put into the same folder. Otherwise it will not work.

Regards,
Arty

Customer replied 253 days and 21 hours ago.

ok how

Picture
Expert:  Arty replied 253 days and 21 hours ago.

Just don't run it from 'zipped' folder, but unpack it first (right click, then 'Extract All' if you are on Windows), then you may run 'stock.bas' or copy 'stock.bas' and 'stock.txt' to the directory where you run it.

Regards,
Arty

Customer replied 253 days and 20 hours ago.

total commission is zero ??

Accepted Answer

Picture
Expert:  Arty replied 253 days and 20 hours ago.

No, I'm getting 318.33 will attach screenshots:

Arty41120.5180903125

Expert TypeComputer Software Engineer
Category: Programming
Pos. Feedback: 99.2 %
Accepts: 353
Answered: 7/30/2012

Experience: 15+ years of programming, C, C++, Java, PHP, awk, ruby, shell, ASM, Forth, Raptor, M.A.R.I.E, Excel

Ask this Expert a Question >
Picture
Expert:  Arty replied 253 days and 20 hours ago.

Please provide the following information:
In what folder 'stock.txt' is located?
In what folder 'stock.bas' is located?
What is your working directory when you run 'qbasic'?

Regards,
Arty

Customer replied 253 days and 20 hours ago.

I paid already I will fix the rest myself thank you

Picture
Expert:  Arty replied 253 days and 20 hours ago.

Thank you. I hope you can manage it.
I leave the question open until you are sure you have no more questions.

Regards,
Arty

Customer replied 253 days and 20 hours ago.

ok thanks

Picture
Expert:  dmoola replied 253 days and 16 hours ago.

What errors were you receiving in my solution? It should've given the exact output you requested.

 
Tweet

2 Programmers are Online Right Now

Ask Your Question Now
Programming Questions Date Submitted
C ProgrammingDecode LabYour assignment is to write a C 4/9/2013
Reference the following instructions to assist you when completing 4/8/2013
First you will present the pseudo code with all the modules 4/8/2013
NA-112 4/8/2013
The first programming project involves completing a program 4/8/2013
RA-201 4/7/2013
This is my final exam for my c programming class. It is due 4/7/2013
Program Description Your program will display (see the sample 4/6/2013
RA-211 4/3/2013
ra-614 4/2/2013
RSS
Next 10 >
Ask A Programmer
Type Your Programming Question Here...
characters left:

Top Programming Experts

See More Programmers

In The News

Nbc
Washington Post
New York Times
Cnn
Learn More

How It Works

  • Ask an Expert
  • Get a Professional Answer
  • Ask Followup Questions
  • 100% Satisfaction Guarantee
Learn More
close
Find Expert answers related to your question.
Sign up using email
We will never post anything without your permission.
Already have an account? Sign in

Ask a Programmer

Get a Professional Answer. 100% Satisfaction Guaranteed.
97 Programmers are Online Now
Type Your Programming Question Here...
characters left:
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.
Truste
Contact Us | Terms of Service | Privacy & Security | About Us
© 2003-2013 JustAnswer LLC