Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: Only attempt this assignment after thoroughly reading Chapter 3 of the Visual Basic text. The objective of the assignment is to first copy a

Objective: Only attempt this assignment after thoroughly reading Chapter 3 of the Visual Basic text. The objective of the assignment is to first copy a Visual Basic solution from the textbook and run it in Visual Studio successfully. The next objective is to modify the program to prompt and read additional pieces of data, change a calculation, and display additional output. The final objective is for the student to be able to describe whether or not this program is a structured program and explain why. Description: In the Visual Basic text on pages 42-43, you will find a complete program that prompts the user for payroll data, reads it in, and displays it for the user. This action continues until the user types in "XXX" to quit. Enter this program into Visual Studio and run it. Note that when you copy it into Visual Studio, you will want to change the Module name to Module1 unless you go into the project properties to modify the "Startup object" (Directions under Lessons->Start Here->How To for those who would like to do this). After familiarizing yourself with this program thoroughly, modify the program to additionally ask the user for an employee number which will be a numeric value such as 3234 with no decimals. Also prompt the user to enter in bonus pay. Since this is a monetary amount, make sure the user can enter values with a decimal point such as 30.45. Currently the Net is set to be equal to the Gross minus the Deduct. Modify this so that the Net is set equal to the Gross minus Deduct plus the Bonus amount. Also change the program to display the employee number as well as the bonus amount for the user along with the other report data. Finally, examine the program in regard to which of the 3 basic structures are included in the solution (Recall Week 4->section Understanding the Three Basic Structures). To do so, walk me through the various parts of the program and identify the structures used. This written answer can be written directly in the drop box message area. To turn in: Submit your zipped project folder to the Chapter 3 Visual Basic Assignment Drop box. As a reminder, you can find information on how to zip your project under the Start Here link and clicking on "How to". For full points, also include the written response to the question above. This can be submitted as a .txt (text) document, Word, or typed in the Drop box message area.

Code to be modified

image text in transcribed

ion Explicit On ion Strict On erences ule Module1 oreferences Sub Main() Dim Name As String Dim GrossString As String Dim Gross, Deduct, Net As Double Const RATE As Double = 0.25 Const QUIT As String = "XXX" Const REPORT_HEADING As String = "Payroll Program" Const END_LINE As String = "**End of Report" 'Work done in the housekeeping procedure Console.WriteLine(REPORT_HEADING) Name = InputBox\$("Enter employee's name:") While (Name QUIT) 'work done in the detailLoop() procedure GrossString = InputBox\$("Enter employee's gross pay: ") Gross = Convert. ToDouble(GrossString) Deduct = Gross * RATE Net = Gross - Deduct Console.WriteLine("Name: " \& Name) Console.WriteLine("Gross Pay: " \&ross) Console.WriteLine("Deductions: " \& Deduct) 'Work done in endOfJob procedure Console.WriteLine(END_LINE) End Sub

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_2

Step: 3

blur-text-image_3

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

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions

Question

Discuss emerging discourse on social class

Answered: 1 week ago

Question

WHAT IS AUTOMATION TESTING?

Answered: 1 week ago

Question

What is Selenium? What are the advantages of Selenium?

Answered: 1 week ago