1.
Enter the test score as numbers. The program will calculate the average score and assign a letter grade based on the following range: A>=90,
B = 79 TO 89, C = 69 to 78, D = 59 TO 68, f <59
Create a function name ValidGrade that checks that a specific grade entered is a number between 0 and 100.
I am attaching a visual basic sample file. So you will get to see how it will look like after it's done.
I already did this part. But I am stuck on the code part.
Create the program using select case statement that assigns a letter grade based on the average of 3 tests score, Test 1, Test 2 and Test 3.
It should display the result in the label in response to click event for calculate command button.
2.
Gen, Inc., is a multinational distribution company. Each month, it much pay its salesforce based on a known formula that uses each employee's monthly sales, number of years with the company, and title. The formula is as follows. For sales amount between $100,000 and $200,000, the sales commission is one percent. For sales amount between $200,001 and $300,000 the sales commission is 1.5 percent. This 1.5 percent sales commission applies to the entire sales amount, not just the incremental amount. For sales amount between $300,001 and $400,000, the sales commission is 1.7 percent. For sales amount greater than $400,000, the commission is 2 percent. Each sales person also receives a 1/10 of 1 percent incentive for each year with the company, uo to 1 percent at 10 years. Thus a salesperson working for 5 years would receive a 1/2 percent incentive. Finally apprentice salespeople do not receive title incentive, associate salespeople receive a 0.1 percent title incentive, and senior sales person receive a 0.2 percent title incentive. When your form is complete, it should resemble the form ( u can see it in the attachment).
Create a function name validate that checks each ofthe input fields for correctness. Validate the sales amount to make sure it is a positive number. Verify that the years of service is also a positive number. In addition, confirm that the title is valid. Valid titles are Apprentice, Associate and Senior. The function should return Boolean value True if all of the input is valid and False otherwise.
The calculate button should call the VALIDATE FUNCTION YOU JUST WROTE. If ALL OF THE INPUT IS valid, calculate the sales commission. If not display a message box to the user.
Erite another function that calculates the sales commission. Call this function from the calculate command button. The function should return a single indicating the amount of sales commission.