IF1201 Introduction to Visual Basic Assignment

Assignment Help Visual Basic Programming
Reference no: EM133114279

IF1201 Introduction to Visual Basic - City, University of London

Assessment
The assessment will be based on the level of basic comprehension or understanding that you demonstrate, including your ability to apply the relevant VBA concepts.

The efficiency, elegance and clarity of the code will be credited. Please remember to:

• Use the most efficient commands and structures.
• Choose your variable names and data types carefully.
• Indent your code.
• Comment sufficiently to explain your code.

Question 1

i. Nike Inc, has reported dividends of $1.20 per share this year. These dividends are expected to grow at 5% per year (g) for the foreseeable future. Nike's future dividend payments at time t will be equal to:
Dt = D0(1 + g)t
D0 = Current dividend
Dt = Future dividend at time or year t
g = Dividend growth rate
t = time or years

The total present value of a stream of future cash flows (or dividends) that last n years is given by:

PV = t=1nDtωt = D0 x [1 - ((1 + g)/(1+i))n] x ((1+g)/(i-g))

ωt = Discount factor = 1/(1 + i)t

i = Discount rate

Create a subroutine that undertakes the following tasks:

1. Reads the assumptions of D0, i, g, and n from an input range of cells on a worksheet. For Nike Inc, these will be

D0 = 1.20
i = 10%
g = 5%
n = 20

2. Assigns these values to corresponding VBA variables.

3. Uses a loop control structure to create a table that contains the year (t), the dividends (Dt), the discount factor (ωt) and the present value of each payment (Dtωt) for each year from year 1 to year n.

4. Once the final year's data has been produced, the subroutine should enter a total row, labelled as such, with the sum of the total of all of the dividends and of their respective present values.

5. Format the total row, so that it is well presented.

6. Below the total row use the formula below to cross check your total present value of the future dividends paid.

PV = D0 x [1 - ((1 + g)/(1 + i))n] x ((1+g)/(i - g))

7. Remember that the subroutine should ‘clear contents' and ‘clear formats' of the output range so that any previous data is cleared as subroutine executes.

ii. Use the above VBA exercise in 1.i. to explain why the declaration of variables within a subroutine, module or project is seen as good coding practice.

iii. Use the above VBA exercise in 1.i. to explain why careful consideration of a variable's ‘data-type' is important. With reference to the variables you have used, document which data type(s) you have used and why.

Question 2

i. Create a workbook containing VBA User Defined Functions (UDFs).

Create two UDFs that:
a. Converts Fahrenheit to Celsius
b. Converts Celsius to Fahrenheit

On a worksheet, and using your UDFs, produce a table that converts a range of temperatures, say from 0°C to 100°C in 5°C increments into °F and then back into °C.

Suggest and demonstrate an alternative method that could be used in Excel to achieve the same calculation and operation.

Attachment:- Introduction to Visual Basic.rar

Reference no: EM133114279

Questions Cloud

Challenge of dealing with multiculturalism : Most MNCs need not enter foreign markets to face the challenge of dealing with multiculturalism.
The need for transitions : Briefly explain how one of the four steps listed under "The Need for Transitions" can be applied to solve each of the challenges identified above.
Record events in Accounting Equation and Balance Sheet : Beginning inventory consisted of 60 items at $350 ea. Record events in Accounting Equation, Balance Sheet, Income Statement, and Statement of Cash Flow
Find the cost of equity : Use the Capital Asset Pricing Model to find the cost of equity (common stock) in percent. Assume FB's beta is 1.2; the risk-free yield on a 30 year long term US
IF1201 Introduction to Visual Basic Assignment : IF1201 Introduction to Visual Basic Assignment Help and Solution, City, University of London - Assessment Writing Service
Prepare the journal entry to record the issuance of bonds : Hoffman Corporation issued $70 million of 5%, 15-year bonds at 102. Prepare the journal entry to record the issuance of bonds
What is the required rate of return : Currently the risk-free return is 3 percent and the market risk premium, , is 8 percent. What is the required rate of return on the following two-stock portfoli
How many shares did D receive from the subscription : ABC Corp was incorporated with an authorized share capital of P3,000,000 divided into 100,000 shares of P30 par. How many shares did D receive from subscription
Grow and develop as leader in the future : What are you currently doing to ensure that you continue to grow and develop as a leader in the future?

Reviews

Write a Review

Visual Basic Programming Questions & Answers

  Create project to display flags of four different countries

Create a project to display flags of 4 different countries depending on the setting of a radio button, into a single display box. In addition, display the name of the country under the flag display box.

  Arithmetic calculator applicationwrite an application that

arithmetic calculator applicationwrite an application that allows the user to enter a series of numbers and manipulate

  Develop application that will browse csv files and plot data

Develop an application on VB.Net that will browse CSV files and plot that data by clicking on load button.

  Create the code form a program in visual basic.net 2003

Create the code form a program in Visual Basic.net 2003

  Write a program that requests the marginal revenue

Write a program that requests the marginal revenue, marginal cost, fixed cost, and number of units of the product produced and sold and then displays one of the following three outputs: Profit, Loss or Break Even.

  Keep a record of the total attendance

Keep a record of the total attendance and the total cash collected from ticket sales from all events happening at the Games.

  Organize the code for user readability

Organize the code for reusability, Provide documentation with embedded comments for reader understanding

  Produce an acceptance test description

You are required to produce an acceptance test description and a detailed black-box test description. These two test types are unrelated so you should consider

  Arrays write a program using dynamic arrays to record the

write a program using dynamic arrays to record the high temperatures of last ltbrgtseven days and to display all of

  Develop an visual basic windows application

Create a Visual Basic Windows application. Use the following names for the solution, project, and form file, respectively: Random Solution, Random Project, and Main Form.vb.

  Write the visual basic code for a pretest loop

Write the Visual Basic code for a pretest loop that uses an Integer variable named intEven to display the even integers from 2 through 20 in the lblEven.

  Apply graphical user interface design principles

Apply graphical user interface design principles - Design conditional and iteration constructs appropriate to a given programming task and design well-written and readable programs using a disciplined coding style, including documentation and indenta..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd