Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Question
Chapter 5, Problem 10E
Program Plan Intro
Form design:
- Open Microsoft Visual Studio.
- Select Visual Basic and click Windows Application.
- Name the project as “Payment Project”.
- Store the file in desire location.
- The created project is now display with a form in the name of Form1.
- Rename the Form1 as “Main Form” and add the necessary components.
- In property window, change the Form name and add changes for Form elements properties.
- Click the File menu->Save All.
View of the form design in the IDE:
The form control properties in the properties window are as follows:
Object | Property | Setting |
Form1 | Text | Monthly Payment |
PicutreBox1 | Image | Mortgage.png |
txtPrincipal | Text | (Empty) |
lstTerms | Items | List of items for year |
lstRates | Items | List of items for rate of interest |
lblPay | Text | (Empty) |
btnCalc | Text | Calculate |
btnExit | Text | Exit |
- Add a picture box to show the image.
- Add a text box control to get the input for principal amount.
- Add two list boxes to show to select number of years and rate of interest respectively.
- Add a label control to display the results of monthly payment.
- Add two button controls to calculate the projected sales and exit the program respectively.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
The Financial officer at RGI wants you to develop an application that will evaluate the
company's asset's annual depreciation using the double-declining balance and sum-of-the
years' digit method. The Financial officer will enter the asset's cost, useful life (in years), and
salvage value (which is the value of the asset at the end of its useful life). The sample of the
application can be seen in Figure 2. The interface provides text boxes for entering the asset
cost and salvage value. It also provides a list box for selecting the useful life, which ranges
from 3 to 20 years. The depreciation amounts are displayed in the list boxes. (You can use
the DDB and SYD functions in Microsoft Excel to verify the amounts shown in Figure 2 are
correct). Create a windows form application using the name RGI annual asset depreciation
App. You can use the visual basic's Financial.DDB method to calculate the double-declining
balance depreciation and use its Financial.SYD method to calculate the…
In this exercise, you modify the Gross Pay application from this lesson. Use Windows to make a copy of the Gross Pay Solution folder. Rename the copy Modified Gross Pay Solution. Open the Gross Pay Solution (Gross Pay Solution.sln) file contained in the Modified Gross Pay Solution folder. Open the designer and Code Editor windows. Locate the form’s Load event procedure. Change both For…Next statements to Do…Loop statements. Save the solution and then start and test the application. Close the Code Editor window and then close the solution.
The below form will represent the main form from which the user will navigate to the other forms. Meaning each button should be linked to the appropriate form. E.g. If button Manage Addresses is clicked the form managed addresses should be displayed. The Exit button should successfully terminate the program.
Create a void method for each button and name them as follow: LinkToAddresses (), LinkToCustomers (), LinkToDrivers (), LinkToStatus (), and LinkToFreight (). The methods should be called under the appropriate button. For the exit button create a void method named AppExit () this should terminate the program.
Chapter 5 Solutions
Programming with Microsoft Visual Basic 2017
Ch. 5 - Rewrite the Loop clause from Question 1 using the...Ch. 5 - Prob. 2MQ3Ch. 5 - Write a For clause that repeats the loop body...Ch. 5 - Write an Add method that adds the contents of the...Ch. 5 - Prob. 2MQ6Ch. 5 - Which of the following clauses will stop the loop...Ch. 5 - Which of the following statements can be used to...Ch. 5 - Prob. 3RQCh. 5 - Prob. 4RQCh. 5 - Prob. 5RQ
Knowledge Booster
Similar questions
- In this exercise, you modify the Grade Calculator application from this chapter’s Apply lesson. Use Windows to make a copy of the Grade Solution folder. Rename the copy Grade Solution-Intermediate. Open the Grade Solution.sln file contained in the Grade Solution-Intermediate folder. Open the CourseGrade.vb file. The DetermineGrade method should accept an integer that represents the total number of points that can be earned in the course. (Currently, the total number of points is 200: 100 points per test.) For an A grade, the student must earn at least 90% of the total points. For a B, C, and D grade, the student must earn at least 80%, 70%, and 60%, respectively. If the student earns less than 60% of the total points, the grade is F. Make the appropriate modifications to the DetermineGrade method and then save the solution. Unlock the controls on the form. Add a label control and a text box to the form. Change the label control’s Text property to “&Maximum points:” (without the quotation marks). Change the text box’s name to txtMax. Lock the controls and then reset the tab order. Open the form’s Code Editor window. The txtMax control should accept only numbers and the Backspace key. Code the appropriate procedure. The grade should be cleared when the user makes a change to the contents of the txtMax control. Code the appropriate procedure. Modify the frmMain_Load procedure so that each list box displays numbers from 0 through 200. Locate the btnDisplay_Click procedure. If the txtMax control does not contain a value, display an appropriate message. The maximum number allowed in the txtMax control should be 400; if the control contains a number that is more than 400, display an appropriate message. The statement that calculates the grade should pass the maximum number of points to the studentGrade object’s DetermineGrade method. Make the necessary modifications to the procedure. Save the solution and then start and test the application.arrow_forwardThe below form will represent the main form from which the user will navigate to the other forms. Meaning each button should be linked to the appropriate form. E.g. If button Manage Addresses is clicked the form managed addresses should be displayed. The Exit button should successfully terminate the program. Create a void method for each button and name them as follow: LinkToAddresses (), LinkToCustomers (), LinkToDrivers (), LinkToStatus (), and LinkToFreight (). The methods should be called under the appropriate button. For the exit button create a void method named AppExit () this should terminate the program.arrow_forwardExtra 7-2 Add a stopwatch to the Clock application In this exercise, you’ll add a stopwatch feature to a digital clock application. The stopwatch will display elapsed minutes, seconds, and milliseconds. 1. Open the application in this folder: exercises_extra\ch07\clock_stopwatch\ 2. In the JavaScript file, note the $(), displayCurrentTime(), padSingleDigit(), and DOMContentLoaded event handler functions from the Clock application. In addition, note the global variables and starting code for the tickStopwatch(), startStopwatch(), stopStopwatch(), and resetStopwatch() functions. 3. In the tickStopwatch() function, add code that adds 10 milliseconds to the elapsedMilliseconds variable and then adjusts the elapsedMinutes and elapsedSeconds variables accordingly. Then, add code that displays the result in the appropriate span tags in the page. 4. In the startStopwatch() function, add code that starts the stopwatch. Be sure to cancel the default action of the link too. 5. In the…arrow_forward
- Browse the web to locate the lyrics to the song “The Twelve Days of Christmas.” The song contains a list of gifts received for the holiday. The list is collective so that as each “day” passes, a new verse contains all the words of the previous verse, plus a new item. Write an application that displays the words to the song starting with any day the user enters. (Hint: Use a switch statement with cases in descending day order and without any break statements so that the lyrics for any day repeat all the lyrics for previous days.)arrow_forwardWhen a form has been modifi ed since the last time it was saved, whatappears on its tab in the designer window?arrow_forward2. Create an Orders application as shown in the figure below. Orders Number ordered: Add Subtract Total ordered: Exit a) The interface provides a button for adding the number ordered to the total ordered, and a button for subtracting the number ordered from the total ordered. b) Code the application using a class-level variable. c) Be sure to code the text box's TextChanged and Enter event procedures. d) Test the application. (If you add 7 and 5, and then subtract 2, 1, and 6, and then add 10, 7, 4, and 5, the total ordered will be 29.)arrow_forward
- This challenge activity consists of a series of auto-generated, randomized questions allowing unlimited submissions. You must correctly answer a question at each level before proceeding to the next level. The purpose of this first level is to familiarize yourself with how the autograder works. Click the "Start" button to begin the challenge activity. Copy the code provided and paste the code into the code window. The following code reads in a value for variable numCucumbers using cin >> and outputs the value of numCucumbers, followed by " cucumbers" using cout <<. cin >> numCucumbers; cout << numCucumbers << " cucumbers" << endl; #include <iostream>using namespace std; int main() { int numCucumbers; // Creates an integer variable named numCucumbers /* Your code goes here */ return 0;}arrow_forward4. Create a Discount Warehouse application. The interface should allow the user to enter an item's original price and select its discount rate from a list box. The discount rates should range from 10% through 40% in increments of 5%. Use a text box for entering the original price, and use a list box for selecting the discount rates. The application should display the amount of the discount and also the discounted price in label controls.arrow_forwardCreate an application that receives an internet application from a company’s prospectivecustomers. The following information must be received from the applicant:- Name - Internet Choice - Applicant salaryIn the event that the “Check application” button is clicked, the complete application result must bedisplayed in the listbox control of a second form. The label control of the second form must simplyindicate whether an application is “approved” or “not approved”If a user has a salary of R2500 or less, then the application cannot be approved, else the applicationwill be approved.arrow_forward
- Write the section of code that would display a list of services in a Label object named lblService if the user selects any of the corresponding CheckBoxes shown in Figure 9-78.arrow_forwardThe above screen is used to browse the products table it uses the ProductDAO.java file, it calls the getProductByCriteria() function which should accept a parameter, this parameter should be the criteria that would be built from the two combo boxes and the text box, and queries the products table.The getProductByCriteria() function should return a list of Product objects that matches the criteria specified. Modify the function so that it accepts a string paramater consisting of the fields from the combo boxes and a price number from the text box separated by commas and use this string to modify the query in the function to return the desired result set. public List<Product> getProductByCriteria() //MAKE MODIFICATIONS TO THIS FUNCTION SO IT CAN TAKE PARAMETER(S) { if (openConnection()) { try{ List<Product> items = new ArrayList <> (); Product temp = null; String…arrow_forwardIn this exercise, you modify one of the Seminars applications from Chapter 4’s Apply lesson. Open the Seminars Solution.sln file contained in the Seminars Solution-CheckBox folder. Create an event-handling Sub procedure named ClearAmountDue and associate it with each check box’s CheckChanged event. Then, create a function that determines which (if any) check boxes are selected and then adds the associated fee to the total due. The function should return the total due to the statement that invoked it. Also, make the necessary modifications to the btnCalc_Click procedure’s code. Save the solution and then start and test the application. In VB please. Code Given: Option Explicit OnOption Strict OnOption Infer Off Public Class frmMain Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click' Calculate and display the amount due. Dim intAmountDue As Integer ' Determine which (if any) check boxes are selected' and add the associated fee to the amount due.If…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning