Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started