Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
thumb_up100%
Chapter 2, Problem 2RQ
Program Plan Intro
To choose the correct option for the given statement.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
The equal sign in an assignment statement is called the_________ .
a- double my_num = 100.0;
b- int $my_num = '10000';
int myNum = 1000;
d- int mynum1 = 100000;
4) Which one is NOT a valid variable declaration?
c-
Programing language is C#
6. Hospital Charges
Create an application that calculates the total cost of a hospital stay. The daily base
charge is $350. The hospital also charges for medication, surgical fees, lab fees, and
physical rehab. The application should accept the following input:
• The number of days spent in the hospital
• The amount of medication charges
• The amount of surgical charges
• The amount of lab fees
• The amount of physical rehabilitation charges
Create and use the following value-returning methods in the application:
• CalcStayCharges—Calculates and returns the base charges for the hospital
stay. This is computed as $350 times the number of days in the hospital.
• CalcMiscCharges—Calculates and returns the total of the medication, surgical,
lab, and physical rehabilitation charges.
• CalcTotalCharges—Calculates and returns the total charges.
Chapter 2 Solutions
Microsoft Visual C#
Ch. 2 - Prob. 1RQCh. 2 - Prob. 2RQCh. 2 - Prob. 3RQCh. 2 - Assume that you have two variables declared as int...Ch. 2 - Assume that you have a variable declared as...Ch. 2 - Assume that you have a variable declared as int...Ch. 2 - Assume that you have a variable declared as int...Ch. 2 - Prob. 8RQCh. 2 - Assume that you have a variable declared as int...Ch. 2 - Assume that you have a variable declared as int...
Ch. 2 - Prob. 11RQCh. 2 - Which of the following is not a C# comparison...Ch. 2 - Prob. 13RQCh. 2 - Which of the following C# types cannot contain...Ch. 2 - Assume that you have declared a variable as double...Ch. 2 - Assume that you have declared a variable as double...Ch. 2 - When you perform arithmetic operations with...Ch. 2 - Prob. 18RQCh. 2 - Prob. 19RQCh. 2 - Which of the following compares two string...Ch. 2 - What is the numeric value of each of the following...Ch. 2 - What is the value of each of the following Boolean...Ch. 2 - Choose the best data type for each of the...Ch. 2 - In this chapter, you learned that although a...Ch. 2 - Write a C# program named InchesTOCentmeters that...Ch. 2 - Prob. 6ECh. 2 - Write a C# program named ProjectedRaises that...Ch. 2 - Convert the ProjectedRaises class to an...Ch. 2 - Malcolm Movers charges a base rate of $200 per...Ch. 2 - Prob. 10ECh. 2 - Write a program named Eggs that declares four...Ch. 2 - Modify the Eggs program to create a new one named...Ch. 2 - Write a program named MakeChange that calculates...Ch. 2 - Write a program named Testslnteractive that...Ch. 2 - Write a program named FahrenheitToCelsius that...Ch. 2 - Prob. 16ECh. 2 - Prob. 17ECh. 2 - Pig Latin is a nonsense language. To create a word...Ch. 2 - Each of the following files in the Chapter.02...Ch. 2 - In Chapter 1, you created two programs to display...Ch. 2 - Prob. 2CP
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
- A variable name should always start with ________.arrow_forward1) double 6my_num = 100.0; b- double my_num ='10000'; c- double _myNum = 1000; d- double my num = 100.0; a- Which one is a valid variable declaration?arrow_forward(Physics) Write an assignment statement to calculate the elapsed time, in minutes, it takes to make a trip. The formula for computing elapsed time is elapsed time = total distance / average speed. Assume the distance is in miles and the average speed is in miles per hour (mph).arrow_forward
- = 1000; int myNum b- double my_num= 100; 4) а- Which one is NOT a valid variable declaration? c- int my_num = '10" d- int mynuml = 10 7/Parrow_forwardPlease written by computer source # with visual studio. Windows Form app (.NET Framework)arrow_forwardA variable with ______ scope has storage created for it by a declaration statement located outside any function.arrow_forward
- One variable can have only _____________ valuearrow_forwardIndicates the missing variable or operator: A + (B • C) = (A + B) • (A+___ )arrow_forwardTrue or False 6. In languages that require variable declarations, a variable’s declaration must appear before any other statements that use the variable.arrow_forward
- You can declare two variables with the same name as long as___ a. they appear within the same block b. they are assigned different values c. they are of different types d. their scopes do not overlaparrow_forwardDevelop a C# application that allows the user to calculate the fat of his daily food. The user should enter: • The total number of calories for a food item • The number of fat grams in that food item Accordingly, the application will calculate and display: • The number of calories from fat • The percentage of calories that come from fat Additionally, the applications categorizes if the food is considered low fat, normal fat, or high fat as the following rule. • If the calories from fat are less than 30% of the total calories of the food, the food is considered low fat. • If the calories from fat are between 30% and 40% of the total calories of the food, the food is considered normal fat. • If the calories from fat are more than 40% of the total calories of the food, the food is considered high fat. Note: Make sure the number of calories and fat grams are not less than 0. Also, the number of calories from fat cannot be greater than the total number of calories. If that happens, display…arrow_forward2 EmployeeBonus.py - This program calculates an employ Summary productivity bonus. In this lab, you complete a prewritten Python program that calculates an employee's productivity 4 bonus and prints the employee's name and bonus. 5 # Initialize variables here. 6 BONUS_1 = 50.00 7 BONUS_2 = 75.00 Bonuses are calculated based on an employee's productivity score as shown in the table below. A 8 BONUS_3 = 100.00 productivity score is calculated by first dividing an employee's transactions' dollar value by the 9 BONUS_4 = 200.00 number of transactions and then dividing the result by the number of shifts worked. 10 11 employeeName = input("Enter employee's name: ") 12 shiftString = input("Enter number of shifts: ") 13 transactString = input("Enter number of transactions 14 dollarString = input("Enter transactions dollar valu 15 |16 numShifts = float(shiftString) |17 numTransactions = float(transactString) |18 dollarValue = float(dollarString) Productivity Score Bonus <30 $50.00 31 - 69…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,C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr