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 4E
Program Plan Intro
Form design:
- Open Microsoft Visual Studio.
- Select Visual Basic and click Windows Application.
- Name the project as “Projected Sales Project”.
- Store the file in desire location.
- The created project is now displayed 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 is shown below:
Object | Property | Setting |
Form1 | Text | Projected Sales |
PicutreBox1 | Image | Growth.png |
txtCurrentSales | Text | (Empty) |
txtGoal | Text | (Empty) |
lblProjSales | Text | (Empty) |
btnCalc | Text | Calculate |
btnExit | Text | Exit |
- Add a picture box to show the image.
- Add two text boxes to input the values of current sales and sales goal.
- Add a label to display the results of the projected sales.
- 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…
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.
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 application displays a shipping charge that is based on the total price entered by the user, as shown in Figure 4-64. Start the application and then test it by clicking the Display shipping button. Notice that the Shipping charge box contains $13, which is not correct. Now, test the application using the following total prices: 100, 501, 1500, 500.75, 30, 1000.33, and 2000. Here too, notice that the application does not always display the correct shipping charge. (More specifically, the shipping charge for two of the seven total prices is incorrect.) Open the Code Editor window and correct the errors in the code. Save the solution and then start and test the application.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
- Question 1 Get room rate Room type single Number of night 3 Room rate 750.00 Get rate Close Figure 2: Get room rate GUI Write a complete program to create a graphical user interface (GUI) which calculate the room rate according to Table 1. The program should calculate and show the room rate in a text field which is not editable when the Get rate button is pressed and the system will be terminated when the Close button is pressed. The size of GUI should be set as 300 x 250. It should be shown in the centre of the screen and the program should shutdown when the user press the close button on the top right corner. Lastly, remember to create an object for the class in a main() method. Table 1: Hotel room rate according to room type Room type single Price in RM (per night) 250 double 320 suite 500arrow_forwardPlease help with the question on the picturearrow_forwardWhen a form has been modifi ed since the last time it was saved, whatappears on its tab in the designer window?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_forwardUsing C# in a visual studio form, Create an application. Add a label and a button to the form. The button’s Click event procedure should add the number 1 to the contents of a class-level Integer variable named intNumber and then display the variable’s contents in the label. Code the application. Be sure to enter the three Option statements above the Public Class clause. Save the solution and then start and test the application. Next, change the class-level variable to a static variable.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
- Create a menu-driven application to keep track of a list of subscribers to a newsletter.The application should allow the user to add a new subscriber, remove a current subscriber, update a subscriber’s data, and display the current list of subscribers. Each subscriber should be identified by a unique ID assigned by the system.For each subscriber, you need to store first name, last name, and email address.The application must have:• A linked list as the main data structure in the application. You must use the C++ Standard Template Library (STL).• A “subscriber” class that contains data and methods related to each subscriber.arrow_forwardTruthful or False? When creating a new control, the Modifiers field is set to Public by default.arrow_forwardPrint Receipt Button Coding.When the user click on the Print button/menuitem/contextmenuitem, the appwill allow him/her to print out the receiptarrow_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 LearningCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE LNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage