subject
Computers and Technology, 22.02.2021 19:40 ilmnow

Visual Basic Help: Code a program that reads a test score (number) from a text-box, each time a button is clicked. In other words, every time a new score is entered in the text-box, the score should be taken by the program, stored and the text-box should be cleared, so that the user can enter a new score. The program should be able to check that the user is entering a number. If the user enters something different than a number (or leaves the text-box empty), the program should not continue and it should display a warning message to the user. After entering as many scores as wanted, the user should be able to click on a second button to display the two highest scores, among all the ones entered until that point. The program should also display the total number of scores entered by the user. Also, once the user clicks on the button to display the results and the results are displayed, the program should get ready to get a new set of scores and start again. If the user starts writing a new score, the text-boxes with the results should be cleared.
Example: Assume the user enters the following scores: 10, 5, 20. The scores are entered once at the time in the top text-box; when a score is entered, the user presses the button to "Read" the score. The score is taken by the program and the text-box is cleared, so that the next score can be entered. This process can be repeated as many times as the user wants and for as many scores as the user wants. Once all the scores are entered and read(or taken-in)by the program, the user clicks on the second button to display the results. The program should then display the two highest scores, among the ones entered. So, in the example, this would be 10, 20. And it should display the total number of scores entered by the user. In the example, it would be 3.
After that, the user should be able to repeat the process and enter a new set of scores, if wanted. The program should therefore be ready to take in new inputs and start the process again. When the user starts typing the new score, the text-boxes with the previous results (two highest scores and total num. of scores) should get cleared

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 12:00, Cocco
Which of the following does 3d animation create an illusion of on the screen? a. depth b. emotion c. length d. dialogue
Answers: 1
image
Computers and Technology, 23.06.2019 13:30, valeriegarcia12
Select the correct answer from each drop-down menu. which types of computer networks are bigger as well as smaller than a man? a man is a network of computers that covers an area bigger than a , but smaller than a .
Answers: 1
image
Computers and Technology, 24.06.2019 21:30, keelynnbarrier
Computer security/cybersecurity1) each of the following code fragments contains a number of security vulnerabilities. for each fragment, identify these security vulnerabilities and, for each vulnerability, discuss at least one way that it could be improved. note that in your discussion of how each vulnerability could be improved, you do not need to re-write a new version of the program in c; simply discuss your solution, either in pseudocode or in 1-2 sentences. a) /* file descriptor leak */#include #include int main(int argc, char *argv[]){ char *filepath = argv[0]; char *shellpath = argv[1]; file *passwords; passwords = fopen(filepath, "r"); /* read the password and do something with it */ /* . . */ /* fork and execute alternative shell */ execl(shellpath, "shell", null); }b)#include /* assume the following function is written for an electronic storefront. the user will enter the id of the item to be ordered, as well as the quantity of units that they would like to purchase. the program will then lookup the price for the price for the item using a predefined function, and return the total cost of the order.*/int gettotalcost(){ char itemid[9]; int price, unitsordered, cost; printf(" enter the 9-digit id of the item to be ordered: "); scanf("%s", & itemid); /* lookup the price according to the itemid */ price = getpricebyid(itemid); printf(" enter the quantity of units to be ordered: "); scanf("%d", & unitsordered); cost = price * unitsordered; return cost; }c)#include /* the following function is intended to return a user's full name by concatenating the user's first and last name into a single string and then returning that string. */char *getfullname(char *firstname, char *lastname, int max_len){ char fullname[max_len]; strcpy(fullname, firstname); strcat(fullname, " "); strcat(fullname, lastname); return fullname; }d)#include /* the following code snippet runs through the list of cli arguments entered and displays them to the console. */int main(int argc, char *argv[]){ int i; printf("you've entered the following arguments: "); for(i = 0; i < argc; i++){ print(argv[i]); printf("\n"); } /* */}
Answers: 2
image
Computers and Technology, 25.06.2019 08:50, mountassarhajar2008
The purpose of this problem is to write some small functions and practice passing things around amoung functions.1) the main function shall ask the user to enter three numbers and read the three numbers.2) write a function named findsum that takes three numbers as arguments and returns their sum. the main function shall call this function.3) write a function named findaverage that takes the sum and the number of numbers and returns the average. the main function shall call this function.4) write a function named findsmallest that takes the three numbers and returns the smallest value. the main function shall call this function.5) the main function shall print the results in the following format, with two decimal positions and the decimal points aligned:
Answers: 3
You know the right answer?
Visual Basic Help: Code a program that reads a test score (number) from a text-box, each time a but...

Questions in other subjects:

Konu
Health, 30.03.2021 19:30
Konu
Mathematics, 30.03.2021 19:30
Konu
Mathematics, 30.03.2021 19:30