Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
expand_more
expand_more
format_list_bulleted
Question
Chapter 6, Problem 5E
Program Plan Intro
1. Below mentioned variables are used
- zipCodes− string array that holds 10 zip codes of deliverable locations.
- zipInput− input zip code read from the console.
- deliveryCharges −string array that holds delivery charges for deliverable locations.
- deliveryCharge −delivery charge for the entered input zip code.
- isZipValid − a boolean value that holds true if the entered zip code is available in zipCodes array
Program description:
This Program is for creating a console application that gets a zipcode as input from the user and checks whether the zip code is available for delivery. If it is available the program will display the corresponding delivery charge. If not available it will print an error message.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Create a program that will ask the user to input the average temperature a day and store it in an Array. Your array should contain days in a week and temperature each day. Display the average temperature in a week, and the day(s) with the highest temperature and lowest temperature.
Design a roulette wheel which allows the user to enter bets on multiple numbers. Allow the user to stop betting when they enter 0 on a bet. The program will then choose a random number between 0 and 36. If the user wins, they will get back 30 times the amount they bet on that number. The program will print out the winning number as well as how much they won or lost. Create an array to store the numbers the user bet on. Create a corresponding array to store the amount they bet on each number.o int[] bets=new int[36];//To store the person's betso int[] amount =new int[36];//To store the amount of the bet Ask them what numbers they want to bet on and how they want to bet. Store these in the arrays. The program chooses a winning random number. Check to see if any of their bets match the correct number. If they have the correct number tell them this and inform them as to how much they won or lost. If they did not get the correct number tell them this and tell them how much they…
1. Create an java program containing an array that stores 20 prices, such as $2.34, $7.89, $1.34, and so on. The application should -display the sum of all the prices, -display all values less than $5.00, -calculate the average of the prices, and -display all values that are higher than the calculated average value.
Chapter 6 Solutions
Microsoft Visual C#
Knowledge Booster
Similar questions
- For each of the following exercises, you may choose to write a console-based or GUI application, or both. Write a program named CheckZips that is used by a package delivery service to check delivery areas. The program contains an array that holds the 10 zip codes of areas to which the company makes deliveries. Prompt a user to enter a zip code, and display a message indicating whether the zip code is in the companys delivery area.arrow_forwardthis practice assignement 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 here is my new code! i need help to get it to working : import java.util.*;public class Quiz {public static void main(String args[]){String questions[]=("1.What is my favorite hobby?\n" + "(a)hair\n(b)makeup\n(c)both a and b\n", "2.Who first discovered makeup?\n" +"(a)Egyptians\n(b)haitians\n(c)Africans", "3.What glue is best to use…arrow_forwardthis 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"…arrow_forward
- Programming Language is C#: Create two integer arrays with the 3 items. Assign random values to each item and find the sum of all items of arrays . Finally, show the result by MessageBox.arrow_forwardPlease help with the question on the picturearrow_forwardIn Visual Basic Please. Modify the application to allow the input for 12 months worth of sales for each salesperson. Your app should allow input for each month of the year. Then, use arrays and a looping structures to total the year's sales for each salesperson, display the sales percentage for each salesperson, and identify not only the highest sales percentage but also each salesperson's highest and lowest month of sales. Think about sending a salesperson's array to a total sales routine, a highest month routine, and a lowest month routine. Do that you will need to set up looping structures appropriately for each.arrow_forward
- The 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_forwardPlease help with the question on the picturearrow_forwardThe intSales array is declared as follows: Dim intSales() As Integer = {10000, 12000, 900, 500, 20000}. The statement intSales(2) += 10 will _____________________. a. replace the 900 amount with 10 b. replace the 900 amount with 910 c. replace the 12000 amount with 10 d. replace the 12000 amount with 12010arrow_forward
- Create an application containing an array that stores eight integers. The application should call five methods that in turn (1) display all the integers, (2) display all the integers in reverse order , (3) display the sum of the integers, (4) display all values less than a limiting argument, and (5) display all values that are higher than the calculated average value.arrow_forwardThe Chat-A-While phone company provides service to six area codes and charges the per-minute rates for phone calls shown in Figure 6-25 (below). Write a program named ChatAWhile that stores the area codes and rates in parallel arrays and allows a user to enter an area code and the length of time for a call in minutes, and then display the total cost of the call. For example if the area code is in the array, such as 715, and the call length is 22 minutes, the output should be: Your phone call to area 715 costs $0.16 per minute For 22 minutes the total is $3.52 If the area code is not in the array, such as 111, the program should not accept a call length, and instead output Sorry - no calls allowed to area 111. Area Code Per-Minute Rate ($) 262 0.07 414 0.10 608 0.05 715 0.16 815 0.24 920 0.14 Figure 6-25 Per-minute phone call rates In order to prepend the $ to currency values, the program will need to use the CultureInfo.GetCultureInfo method. In order to do this,…arrow_forwardJAVA I cannot figure this one out no matter what I do I cannot get it to run. Please write it in a student way not in an too advance way. Write an application containing three parallel arrays that hold 10 elements each. The first array hold four-digit student ID numbers, the second array holds first names, and the third array holds the students’ grade point averages. Use dialog boxes to accept a student ID number and display the student’s first name and grade point average. If a match is not found, display an error message that includes the invalid ID number and allow the user to search for a new ID number.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT