Microsoft Visual C#
Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
Question
Book Icon
Chapter 6, Problem 9E
Program Plan Intro

Program Plan

1. Below mentioned variables are used

  • salesPerson[]− Array that stores the names of a salesperson.
  • initials[]− Array that stores the initials of a salesperson.
  • input − input variable that reads the initial of a salesperson as string value from the console.
  • salesValues[] - Array that stores the number of sales by each salesperson.
  • totalSaleAmount − Accumulated sales amount of all the salespeople.
  • saleAmount − Sale amount given as input by the user.

Program description:

This Program is for creating a console application that gets the initials of a salesperson and then gets the sale amount by that salesperson. It calculates the total sale amount of each person individually and then calculates the total sale amounts by the entire salespersons. Finally, the salesperson with the highest sales value is displayed.

Blurred answer
Students have asked these similar questions
this practcie assignment wants me to Write an application that contains an array of 10 multiple-choice quiz questions related to your favorite hobby. Each question contains three answer choices. Also create an array that holds the correct answer to each question—A, B, or C. Display each question and verify that the user enters only A, B, or C as the answer—if not, keep prompting the user until a valid response is entered. If the user responds to a question correctly, display Correct!; otherwise, display The correct answer is and the letter of the correct answer. After the user answers all the questions, display the number of correct and incorrect answers .  how do i create arrays help!! here is my code that i have so far : import java util.Scanner;public class Quiz {public static void main(String[] args) {Scanner input = new Scanner(System.in);System.out.println("What is my favorite hobby?\n" + "(a)hair\n(b)makeup\n(c)both a and b\n");System.out.println("Who first discovered makeup?\n"…
Instructions: In the code editor, you are provided with the definition of a struct Person. This struct needs an integer value for its age and character value for its gender. Furthermore, you are provided with a displayPerson() function which accepts a struct Person as its parameter. In the main() function, there's a pre-created array of 5 Persons. Your task is to ask the user for the values of the age and gender of these Persons. Then, once you've set their ages and genders, call the displayPerson() function and pass them one by one. Input 1. A series of ages and genders of the 5 Persons Source Code: #include<stdio.h> typedef struct {    int age;    char gender;} Person; void displayPerson(Person); int main(void) {    Person persons[5];       return 0;} void displayPerson(Person p) {    printf("PERSON DETAILS:\n");    printf("Age: %d\n", p.age);    printf("Gender: ");    if(p.gender == 'M') {        printf("Male");    } else {        printf("Female");    }…
You can assign the contents of one array to another by using the assignment operator. the equality operator. both array names. A and C together. none of the above.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning