Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
You can use any C# compiler or the method you already know.
The following table contains quarterly sales figures for five (5) departments:
Quarter 1 |
Quarter 2 |
Quarter 3 |
Quarter 4 |
Total |
|
Department 1 |
750 |
660 |
910 |
800 |
|
Department 2 |
800 |
700 |
950 |
900 |
|
Department 3 |
700 |
600 |
750 |
600 |
|
Department 4 |
850 |
800 |
1000 |
950 |
|
Department 5 |
900 |
800 |
960 |
980 |
|
Total |
Design and write a Windows program/module named SalesAnalysis that will:
- Declare a two-dimensional integer array named sales – (Note: you have 6 rows and 5 columns) - that will hold the 4 quarterly sales for 5 departments
- Populate the first four columns for the 5 departments using the data in the preceding table.
- Contain a loop to compute and populate the total column. Store each department’s total in the array as it is being computed.
- Contain a loop to compute and populate the total row. Store each quarter’s total in the array as it is being computed.
- Using a Procedure (sub program – Private or Public) format and display the table with both the row and column totals. Pass the array as an argument – ByVal. Make sure to document and/or provide comments as much as you can. Remember to include comments in the program body to explain the codes. Provide the
algorithm for the program
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- True or False When you create a numeric array in C#, its elements are set to the value 0 by default.arrow_forwardThe logic will allow the user to: Load a single dimensional array of size 50 with a random number The random number will range from 1 to 1,000 (you may have duplicate values) Find the highest value and the index location that it was in Find the smallest value and the index location that it was in Display the array’s contents. Display the highest value and its index location Display the lowest value and its index location Allow the user to execute this application multiple times (some sort of loop?) You will need one for loop to load the array as well as one or two for loops to search that array. The rand also has a “nasty” tendency to create the same results repeatedly in an exe. To avoid that, we have to “shuffle the deck” every time. This ensures that all numbers are an equal probability of appearing and not the same set of values (would create a boring game). // Add this to "shuffle the deck" every time to ensure that // different values could occur else the exe produces the…arrow_forwardIn C Programming Write a main function that declares an array of 100 ints. Fill the array with random values between 1 and 100. Calculate the average of the values in the array. Output the average.arrow_forward
- C# application that will allow users to enter values store all the expenses on that month in an array clothes, food, cool drinks, water, meatarrow_forwardIn this lab, you use what you have learned about searching an array to find an exact match to complete a partially prewritten C++ program. The program uses an array that contains valid names for 10 cities in Michigan. You ask the user to enter a city name; your program then searches the array for that city name. If it is not found, the program should print a message that informs the user the city name is not found in the list of valid cities in Michigan. The file provided for this lab includes the input statements and the necessary variable declarations. You need to use a loop to examine all the items in the array and test for a match. You also need to set a flag if there is a match and then test the flag variable to determine if you should print the the Not a city in Michigan. message. Comments in the code tell you where to write your statements. You can use the previous Mail Order program as a guide. Instructions Ensure the provided code file named MichiganCities.cpp is open. Study…arrow_forwardThe Java language definition demands that all references to array elements be checked to ensure that the index or indices are in their legal ranges, is an example of VS ____. (one word answers) Blank # 1 Blank # 2 A A/arrow_forward
- You can Use C++ programming, Windows Programming, Java, or Ptyhon to solve it The following table contains quarterly sales figures for five (5) departments: Quarter 1 Quarter 2 Quarter 3 Quarter 4 Total Department 1 750 660 910 800 Department 2 800 700 950 900 Department 3 700 600 750 600 Department 4 850 800 1000 950 Department 5 900 800 960 980 Total Design and write a Windows program/module named SalesAnalysis that will: Declare a two-dimensional integer array named sales – (Note: you have 6 rows and 5 columns) - that will hold the 4 quarterly sales for 5 departments Populate the first four columns for the 5 departments using the data in the preceding table. Contain a loop to compute and populate the total column. Store each department’s total in the array as it is being computed. Contain a loop to compute and populate the total row. Store each quarter’s total in the array as it is…arrow_forwardProblem Description - JAVA PROGRAMMING Use a Two-dimensional (3x3) array to solve the following problem: Write an application that inputs nine numbers, each of which is between 1 and 10, inclusive. Display the array after the user inputs each value. Rotate/flip the array by changing places. Make the rows columns and vice versa. You have to move the elements to their new locations. Remember to validate the input and display an error message if the user inputs invalid data. Documentation and the screenshot(s) of the results. Example: 1 2 3 4 5 6 7 8 9 the result will be : 1 4 7 2 5 8 3 6 9arrow_forwardIn visual basic Declare a two-dimensional array that has 3 columns and 4 rows.arrow_forward
- Consider the following program specification: Write a program that will prompt the user for 10 integer values and stores them in an array. The values entered by the user only be between 0 and 100 and the program should validate these appropriately. The program should then: Display the average of the values Display the highest value in the array Display the lowest value in the array Discuss how the values should be validated. What control structures could be used? Using eclipsearrow_forwardIn c++ The Lo Shu Magic Square is a grid with 3 rows and 3 columns shown in Figure. The Lo ShuMagic Square has the following properties:• The grid contains the numbers 1 through 9 exactly• The sum of each row, each column, and each diagonal all add up to the same number.In a program you can simulate a magic square using a two-dimensional array. Write a functionthat accepts a two-dimensional array as an argument, and determines whether the array is a LoShu Magic Square. Test the function in a program.arrow_forwardWhat should a programmer be especially aware of when programming with arrays? Syntax errors If-then-else statements Modularization Using an Out of Bounds array subscriptarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education