Starting Out With Visual C# (5th Edition)
Starting Out With Visual C# (5th Edition)
5th Edition
ISBN: 9780135183519
Author: Tony Gaddis
Publisher: PEARSON
Expert Solution & Answer
Book Icon
Chapter 3.6, Problem 3.32CP

a.

Explanation of Solution

Justification:

Given variable name is “discountPercentage”

The expected data type for “discountPercentage” variable is “double”.

The string formatting parameters are “p” or “P” for percentage format.

Example program:

//Include libraries

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows...

b.

Explanation of Solution

Justification:

Given variable name is “atomicWeight”

The expected data type for “atomicWeight” variable is “double”.

The string formatting parameters are “f” or “F” for percentage format.

Example program:

//Include libraries

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System...

c.

Explanation of Solution

Justification:

Given variable name is “retailPrice”

The expected data type for “retailPrice” variable is “decimal”.

The string formatting parameters are “c” or “C” for percentage format.

Example program:

//Include libraries

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System...

d.

Explanation of Solution

Justification:

Given variable name is “quantityPurchased”

The expected data type for “quantityPurchased” variable is “int”.

The string formatting parameters are “n” or “N” for percentage format.

Example program:

//Include libraries

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System...

e.

Explanation of Solution

Justification:

Given variable name is “degreesKelvin”

The expected data type for “degreesKelvin” variable is “int”.

The string formatting parameters are “e” or “E” for percentage format.

Example program:

//Include libraries

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System...

Blurred answer
Students have asked these similar questions
Which of the following is true about data type? (Multiple answer)   A. It refers to the kind of data a variable may store B. It specifies the type of data that a variable may hold in the programming language C. It is the category of the data youre going to store in your variable. D. It is the organization of data
The following variable names give an indication of the data each stores. For eachvariable, specify the format string that you think is most appropriate. degreesKelvin
Use the following variables when answering questions 1-6. What is the output from the following statement?  disp( sum( W & A) ) disp( find( [as{:}] >=30 | [ws{:}]<=50 ) ) disp( sum([ ps{ strcmp(cs,'Philly') & M, A } ] ))  disp( ps( as<10, W ) ); disp( strjoin({qs.name}, ',') )  disp( sum( [qs(1).drugdose] ) )

Chapter 3 Solutions

Starting Out With Visual C# (5th Edition)

Ch. 3.2 - Assuming the variable greeting has not been...Ch. 3.2 - Will the following statement cause an error? Why...Ch. 3.2 - Write a single declaration statement for the...Ch. 3.3 - Prob. 3.14CPCh. 3.3 - Which of the following variable declarations will...Ch. 3.3 - Write a programming statement that will convert...Ch. 3.3 - Prob. 3.17CPCh. 3.3 - Prob. 3.18CPCh. 3.4 - List the operands for the following math...Ch. 3.4 - Prob. 3.20CPCh. 3.4 - Prob. 3.21CPCh. 3.4 - Prob. 3.22CPCh. 3.4 - Prob. 3.23CPCh. 3.4 - Prob. 3.24CPCh. 3.4 - Rewrite the following statements using combined...Ch. 3.5 - Prob. 3.26CPCh. 3.5 - Prob. 3.27CPCh. 3.5 - Prob. 3.28CPCh. 3.5 - Prob. 3.29CPCh. 3.6 - Prob. 3.30CPCh. 3.6 - Write a programming statement that displays the...Ch. 3.6 - Prob. 3.32CPCh. 3.6 - Prob. 3.33CPCh. 3.6 - Prob. 3.34CPCh. 3.7 - Prob. 3.35CPCh. 3.7 - Prob. 3.37CPCh. 3.7 - Prob. 3.38CPCh. 3.7 - What causes the program to jump to the catch...Ch. 3.7 - Prob. 3.40CPCh. 3.9 - Prob. 3.41CPCh. 3.9 - Write a programming statement that declares a...Ch. 3.9 - Where should you place field declarations in a...Ch. 3.9 - Prob. 3.45CPCh. 3.9 - Prob. 3.46CPCh. 3.10 - Write a programming statement that declares a...Ch. 3.10 - Write a programming statement that uses the...Ch. 3.10 - What method of the Math class can he used to...Ch. 3.12 - What method of the Math class can be used to...Ch. 3.12 - Prob. 3.51CPCh. 3.12 - Prob. 3.52CPCh. 3.12 - Write a programming statement that gives the focus...Ch. 3.12 - Prob. 3.54CPCh. 3.12 - Prob. 3.55CPCh. 3.12 - Prob. 3.56CPCh. 3.12 - Prob. 3.57CPCh. 3.12 - When a GroupBox control is deleted, what happens...Ch. 3.12 - Prob. 3.59CPCh. 3.12 - Prob. 3.60CPCh. 3 - When the user types into a TextBox control, the...Ch. 3 - A_____ is a storage location in memory that is...Ch. 3 - Prob. 3MCCh. 3 - A variables______ indicates the type of data that...Ch. 3 - Fundamental types of data, such as strings,...Ch. 3 - A______ identifies a variable in the program code...Ch. 3 - A common operation performed on strings is_______,...Ch. 3 - A______ belongs to the method in which it is...Ch. 3 - Programmers use the term________ to describe the...Ch. 3 - A variables______ is the time period during which...Ch. 3 - One way to make sure that a variable has been...Ch. 3 - You can use a______ to explicitly convert a value...Ch. 3 - Prob. 13MCCh. 3 - A programmers tools for performing calculations...Ch. 3 - A_______ performs a calculation and gives a value....Ch. 3 - Prob. 16MCCh. 3 - Prob. 17MCCh. 3 - A(n)_______ is a piece of data that is passed into...Ch. 3 - A(n)________ is an unexpected error that occurs...Ch. 3 - Prob. 20MCCh. 3 - Prob. 21MCCh. 3 - Prob. 22MCCh. 3 - A_______ is a name that represents a value that...Ch. 3 - A_______ is a variable that is declared inside a...Ch. 3 - A(n)________ specifics how a class member can be...Ch. 3 - A________ is a field that cannot be changed by any...Ch. 3 - The .NET Framework provides a class named_______,...Ch. 3 - Prob. 28MCCh. 3 - The order in which controls receive the focus is...Ch. 3 - Prob. 30MCCh. 3 - Prob. 1TFCh. 3 - Prob. 2TFCh. 3 - Prob. 3TFCh. 3 - Prob. 4TFCh. 3 - The order of operations dictates that the division...Ch. 3 - Prob. 6TFCh. 3 - When you pass the formatting string "C" or "c" to...Ch. 3 - Prob. 8TFCh. 3 - An error will occur if the compiler finds a...Ch. 3 - Prob. 10TFCh. 3 - Prob. 1SACh. 3 - What two things does a variable declaration...Ch. 3 - Give an example of a programming statement that...Ch. 3 - What is the term used for a number that is written...Ch. 3 - What are the values on the right and left of an...Ch. 3 - Name the family of methods in the .NET Framework...Ch. 3 - Prob. 8SACh. 3 - What is the purpose of a try-catch statement?Ch. 3 - Prob. 10SACh. 3 - Prob. 11SACh. 3 - Prob. 12SACh. 3 - Name Formatter Create an application that lets the...Ch. 3 - Tip, Tax, and Total Create an application that...Ch. 3 - Distance Traveled Assuming there are no accidents...Ch. 3 - Sales Tax and Total Create an application that...Ch. 3 - Celsius and Fahrenheit Temperature Converter...Ch. 3 - Body Mass Index Create an application that lets...Ch. 3 - Prob. 7PPCh. 3 - How Much Insurance? Many financial experts advise...Ch. 3 - Cookie Calories A bag of cookies holds 40 cookies....Ch. 3 - Prob. 10PPCh. 3 - Automobile Costs Create an application that lets...Ch. 3 - Paint Job Estimator A painting company has...Ch. 3 - Property Tax If you own real estate in a...Ch. 3 - Stadium Seating There are three seating categories...
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage