Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Visual Basic .NET Application Coding Exercise 3 (Exercise 13, Zack, 2016, p. 642). Please share the code for the below application using VisualBasic.NET For this

Visual Basic .NET Application Coding Exercise 3 (Exercise 13, Zack, 2016, p. 642). Please share the code for the below application using VisualBasic.NET

For this coding exercise:

Create an application that can be used to calculate the cost of installing a fence around a rectangular area.

Use Windows to copy the Rectangle.vb file from the VB2015\Chap11 folder to the Fence Solution\Fence Project folder. Use the Project menu to add the Rectangle.vb class file to the project. Here is the code for the Rectanble.vb class file:

Public Class Rectangle

Private _intLength As Integer

Private _intWidth As Integer

Public Property Length As Integer

Get

Return _intLength

End Get

Set(value As Integer)

If value > 0 Then

_intLength = value

Else

_intLength = 0

End If

End Set

End Property

Public Property Width As Integer

Get

Return _intWidth

End Get

Set(value As Integer)

If value > 0 Then

_intWidth = value

Else

_intWidth = 0

End If

End Set

End Property

Public Sub New()

_intLength = 0

_intWidth = 0

End Sub

Public Sub New(ByVal intL As Integer, ByVal intW As Integer)

Length = intL

Width = intW

End Sub

Public Function GetArea() As Integer

Return _intLength * _intWidth

End Function

End Class

Modify the class to use Double (rather than Integer) variables and properties.

Add a method named GetPerimeter to the Rectangle class. The method should calculate and return the perimeter of a rectangle. To calculate the perimeter, the method will need to add together the length and width measurements, and then multiply the sum by 2.

Create the interface shown (I've already done this below):

image text in transcribed

(Hint: Using 120 feet as the length, 75 feet as the width, and 10 as the cost per linear foot of fencing, the installation cost is $3,900.00.)

Thanks!

All-Around Fence Company Length (feet) Width (feet) Cost (per linear foot) Total cost: Calculate Total Cost Exit

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

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions

Question

3. What are potential solutions?

Answered: 1 week ago

Question

What is Accounting?

Answered: 1 week ago

Question

Define organisation chart

Answered: 1 week ago

Question

What are the advantages of planning ?

Answered: 1 week ago

Question

Explain the factors that determine the degree of decentralisation

Answered: 1 week ago

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago