Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Review Question_4: This Review Question consists of two part! Problem statement: An investor wishes to obtain and display a company's price-to-earnings ratio, which is represented

image text in transcribed

Review Question_4: This Review Question consists of two part! Problem statement: An investor wishes to obtain and display a company's price-to-earnings ratio, which is represented by quotient (price / earnings). The investor requests the company's earnings-per share for the year and the current price of one share of common stock, as input. a) Required: By using a paragraph of two lines, (1) Identify any statement or statements that causes error or errors in the above lines of code. (2) State the type of the error or errors. (3) Clearly explain why the error or errors occurred. If there is no error, then state "None". "Assume no errors on the instructor part". Public class frm Stocks Private Sub btnCompute_Click(...)Handles btnCompute. Click Dim per As Double per = CDbl(txtPrice.Text) / CDbl(txtEarnings.Text) txtPER.Text = "per" End Sub End Class b) Required: Rewrite above code with the error or errors removed. Reviewing Question_5: Carefully read the scenario below; Profit Margin: The markup of an item is the difference between its selling price and its purchase price. The profit margin is the quotient (markup/ selling price), expressed as a percentage. Required: Start writing an Event Procedure with the header; Private Sub btnCompute_Click(...) Handles btnCompute.Clcik For each step described below write the required code to calculate the profit margin of an item.Lines that display data should use the given variable names. i. ii. iii. Declare the variable purchase Price as type Decimal and assign it the value 215.50. Declare the variable selling Price as type Decimal and assign it the value 229.99. Declare the variable markup as type Decimal and assign it the difference of the selling price and purchase price. Declare the variable pofitMargin as type Decimal and assign it 100 times the quotient of (markup/ selling Price). Display the pofitMargin in a Listbox. iv. v

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions

Question

Write the difference between sexual and asexual reproduction.

Answered: 1 week ago

Question

What your favourite topic in mathematics?

Answered: 1 week ago

Question

Briefly describe vegetative reproduction in plants.

Answered: 1 week ago

Question

8. Design office space to facilitate interaction between employees.

Answered: 1 week ago