subject

Both the hot dog price and sales tax rate may contain decimal amounts, so they should be declared as type double constants. in visual basic, a constant is denoted by the keyword const. by convention, constant names are usually written in all upper case, with underscores to separate words. you also have to assign the value to a constant at the time you declare it (because, by definition, the value of a constant cannot be changed).

for example, the declaration of a constant double representing an delivery charge rate of 3.5% could look like this in visual basic:

const dbl_delivery_charge_rate as double = 0.035
write statements to declare and initializing constants for:

a sales tax rate of 7%: [type your answer here]

the price of a dronedogs hot dog at $1.99: [type your answer here]

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:20
Pp 4.1 design and implement a class called sphere that contains instance data that represents the sphere’s diameter. define the sphere constructor to accept and initialize the diameter and include getter and setter methods for the diameter. include methods that calculate and return the volume and surface area of the sphere (see pp 3.5 for the formulas). include a tostring method that returns a one-line description of the sphere. create a driver class called multisphere, whose main method instantiates and updates several sphere objects.
Answers: 1
question
Computers and Technology, 23.06.2019 01:50
Create a class named majors that includes an enumeration for the six majors offered by a college as follows: acc, chem, cis, eng, his, phys. display the enumeration values for the user, then prompt the user to enter a major. display the college division in which the major falls. acc and cis are in the business division, chem and phys are in the science division, and eng and his are in the humanities division. save the file as majors.java.
Answers: 2
question
Computers and Technology, 24.06.2019 22:00
Is the process of organizing data to reduce redundancy. a. normalization b. primary keying c. specifying relationships d. duplication
Answers: 1
question
Computers and Technology, 25.06.2019 08:30
Which of the following terms is described as “the art and design of using text”? a. typography b. elements of design c. typos d. graphic design
Answers: 1
You know the right answer?
Both the hot dog price and sales tax rate may contain decimal amounts, so they should be declared as...
Questions
question
Mathematics, 07.12.2019 18:31
Questions on the website: 13722360