Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
expand_more
expand_more
format_list_bulleted
Question
Chapter 6, Problem 6E
Program Plan Intro
- userAreaCode, callLengthTime,totalCost, areaCodeandperMinuteRate variables are used in the program.
- Convert.ToInt32 () function is used to convert the string input into the integer.
Program Description:The main purpose of the program is to get the area code and the length of time for a call in minutes from the user, then calculate the total cost of the call using the Per-Minute Rate of a particular area. Display the total cost of the call.
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
JAVA 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.
Suppose a teacher has five students who have taken
four tests. The teacher uses the following grading
scales to assign a letter grade to a student, based on
the average of his or her four test scores.
Test Score Letter Grade
90-100
80-89
70-79
60-69
0-59
A
B
C
D
F
Create an application that uses an array of strings to
hold the five student names, an array of five strings to
hold each student's letter grades, and five arrays of
four single precision numbers to hold each student's
set of test scores.
in C#, Visual Basic
Write an app for Boston Airlines that allows a customer to reserve a seat on the airline’s only plane (capacity: 10 seats).
Radio buttons should allow the choice between First Class and Economy.
The app should then assign a seat in the first-class section (seats 1–5) or the economy section (seats 6–10).
Use a one-dimensional array of type bool to represent the seating chart of the plane.
Initialize all the elements of the array to false to indicate that all the seats are empty.
As each seat is assigned, set the corresponding element of the array to true to indicate that the seat is no longer available.
Your app should never assign a seat that has already been assigned.
When the economy section is full, your app should ask the person if it is acceptable to be placed in the first-class section (and vice versa).
If yes, make the appropriate seat assignment.
If no, display the message “Next flight leaves in 3 hours."
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_forwardWrite a C# console application named MaxMin that asks the user to enter 5 integers, representing the test scores of 5 students. For each input score, you need to check and make sure it is valid (i.e., in between 0 and 100). Store the 5 integers in an int array, and then find and display the highest and the lowest scores on the screen. For example, if you have the 5 scores as {85, 72, 65, 98, 80}, then the output message should be "The highest score is 98, and the lowest score is 65". Hint: use a while loop.arrow_forwardWrite a Java application and use a two-dimensional array that will store the five top artist sales for 2017. The application must also hold the artist sales for CDs, DVDs and BLU RAY items.Your program must: Q.1.1 Create a two-dimensional array to contain the three sale items for five different artists. A single array must be used to store the artist names. Q.1.2 Allow a user to enter in a number, ranging from 1 to 5, which will represent the artist position with regards to the album sales.Q.1.3 Printout the artist name including the CD, DVD, BLU RAY sales amounts and total sales.arrow_forward
- Using c++, modify the mortgage program to display 3 mortgage loans: 7 year at 5.35%, 15 year at 5.5%, and 30 year at 5.75%. Use an array for the different loans. Display the mortgage payment amount for each loan. Do not use a graphical user interface.arrow_forwardWrite a basic program in F# and Visual Basic, which calculates the average of an array which has 7 elements, each assigned avalue and compare the result with 0, as follows.define an array and assign valuesadd all the values by using a loopcalculate the averagecompare the average with 0, if it is greater than zero display positive, else display negativearrow_forwardWrite a java application and use a Two dimensional array to store five sunglasses brand sales, with the total sales for each sunglasses brand. Your program must cointain a Two dimensional array to contain three sale amounts for five different sunglasses brands and single array to contain the sunglasses brands. BRAND SALE AMOUNT 1 SALE AMOUNT 2 SALE AMOUNT 3 Oakley 300 100 500 Ray Ban 50 100 200 LE Specs 200 100 200 Gucci 100 70 50 Diesel 300 100 500 Calculate and print the total sales for each sunglasses brand. Determine if the sunglasses brand was successful or not. If the total sales amount of the brand is greater than or equal to five hundred(500), then the brand is successful. Print out each sunglasses brand with the total sales,amount.arrow_forward
- In C#, 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. (Note that this array is created for you and does not need to be changed.) Prompt a user to enter a zip code, and display a message indicating whether the zip code is in the company’s delivery area. For example if the user enters a zip code in the array, such as 60007, the output should be Delivery to 60007 ok. If the user enters a zip code not in the array, such as 60008, the output should be Sorry - no delivery to 60008.arrow_forwardPlease help with the question on the picturearrow_forwardI * Write a code program to read a two-dimensional array (A), and assign values to an array (A) by using the counter. In Visual Basic Fo. Array (A) 0 0 0 0 11 11 1 1 11 0 0 0 0 Button1arrow_forward
- Create a program that will track student names and their grades and perform some simple statistics. In a main class create an ArrayList or array that will hold Student names. Create a second (parallel) ArrayList or array that will hold student scores, represented as integers from 0-100. Prompt the user to enter some students (for your purposes, enter information for at least three). Then present a menu for the user. The menu will contain the following options: Find student with the highest grade (print out the name of the student) Find grade average (return the grade average back to the calling method) print information of all students exit program Create methods in your main class for these options. Keep the your ArrayList or array inside your main method and pass it to the other methods; it should not be a global variable. Validate the grade; the user should not enter anything below 0 or above 100.arrow_forwardProgramming 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_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
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT