1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Goryan [66]
3 years ago
5

Write a statement that assigns freeBooks the appropriate value based on the values of the boolean variable isPremiumCustomer and

the int variable nbooksPurchased.
Engineering
1 answer:
solniwko [45]3 years ago
4 0

Write a statement that assigns freeBooks the appropriate value based on the values of the boolean variable isPremiumCustomer and the int variable nbooksPurchased is described below

Explanation:

Online Book Merchants offers premium customers 1 free book with every purchase of 5 or more books and offers 2 free books with every purchase of 8 or more books. It offers regular customers 1 free book with every purchase of 7 or more books, and offers 2 free books with every purchase of 12 or more books.

A statement that assigns freeBooks the appropriate value based on the values of the boolean variable isPremiumCustomer and the int variable nbooksPurchased. Here's what we have:

if(isPremiumCustomer = true){

   if(nbooksPurchased >= 5));

        freeBooks = 1;  

   }else if(nbooksPurchased >= 8){

  freeBooks = 2;

}else {

if(nbooksPurchased >= 7);

  freeBooks = 1;

}else if(nbooksPurchased >= 12){

 freeBooks = 2;

}

We are getting an error of "illegal start of expression".

Two of the hints are "You are using an incorrect number somewhere in your solution" and "We think you might want to consider using: ==".

I do not want the answer, I just want pointed in the right direction.

You might be interested in
2 Describe the four major disciplines of engineering and identify problems or projects that an engineer in each discipline might
Harman [31]
Answer: Starting of with Chemical Engineering something that they may encounter is a lack of adeptness man puissance. People that are working there are not much adept or having cognizance regarding to chemical industry. Something someone with a Civil engineering might encounter is the quandary of sustainable construction, and amendment construction site safety. To go on , something that Electrical engineering might encounter is a Non technical , Virtually an electrical engineer has to deal with an astronomical range of machines , control panels,instruments. For example you are working with circuit breakers,as anon as you’ll have expertise on any particular type of circuit breaker, there's a transmutation in trend and the CB you are working with is already obsolete. And last but no least , Something someone might encounter while doing Mechanical engineering is there toxic substances because their work environment is susceptible to fires, explosions, structural failures and equipment malfunctions.
5 0
3 years ago
A water tank is completely filled with liquid waterat 20°C.The tank material is such that it can withstand tensioncaused by a vo
Xelga [282]

Answer:

Highest temperature rise allowable = ΔT = 21.22°C

Highest allowable temperature = ΔT + 20 = 41.22°C

Explanation:

From literature, the coefficient of volume expansion of water between 20°C and 50°C = β = (0.377 × 10⁻³) K⁻¹

Volume expansivity is given by

ΔV = V β ΔT

ΔV = Change in volume

V = initial volume

β = Coefficient of volume expansion = (0.377 × 10⁻³) K⁻¹ = 0.000377 K⁻¹

ΔT = Change in temperature = ?

It is given in the question that maximum volume increase the tank can withstand is

(ΔV/V) × 100% = 0.8%

(ΔV/V) = 0.008

V β ΔT = ΔV

β ΔT = (ΔV/V)

β ΔT = 0.008

ΔT = (0.008/β)

ΔT = (0.008/0.000377)

ΔT = 21.22°C

Highest temperature rise allowable = ΔT = 21.22°C

Highest allowable temperature = ΔT + 20 = 41.22°C

Hope this Helps

5 0
4 years ago
To make an even better electrical junction, what should you do?
docker41 [41]

Answer:

A:Solder it.

Explanation:

Hopefully this helps!

4 0
3 years ago
Solve the problem with conditions if a wall has inner and outer surface temperatures of 16 and 6 C, respectively. The interior a
Angelina_Jolie [31]

Answer:

Heat flux is 20 W/m^2

Explanation:

Heat flux (Q) is computed as

Q = h \, \Delta T

where h is heat transfer coefficient and ΔT is the difference between body's temperature

From the interior air to the inner wall

Q = 5 \frac{W}{m^2 K} \, 4 K

Q = 20 \frac{W}{m^2}

From the the outer wall to the exterior air

Q = 20 \frac{W}{m^2 K} \, 1 K

Q = 20 \frac{W}{m^2}

The wall is under steady-state condition because heat flux is constant  

7 0
3 years ago
Mechanical clips are used to close bags and keep things together. Investigate the design of various paper clips, hair clips, and
pochemuha

Answer:

Hair clip: this used to hold human hairs together especially long hairs

The Design parameters to be considered are : number of teeth, durability of the material to be used and also the width ( how wide the clip can open )

Advantages : very easy to use, holds hairs tight

Disadvantages : Expensive and material used is sometimes brittle

paper clips : This used to hold papers together it is made of a thin elastic wire

The design parameters to be considered are : length of the wire, material to be used and the elasticity of the material

advantages : it is quite cheap and good strength

disadvantages :it can hold a limited amount of papers together

potato chip bag clips: These clips are used on potato chip bags to ensure that the bags are air tight

The design parameters to be considered are : Elasticity of the material to be used , and size

Advantages : it helps to prevent the potato chips from getting exposed to air

disadvantages : Not very popular and its quite expensive

Explanation:

Hair clip: this used to hold human hairs together especially long hairs

The Design parameters to be considered are : number of teeth, durability of the material to be used and also the width ( how wide the clip can open )

Advantages : very easy to use, holds hairs tight

Disadvantages : Expensive and material used is sometimes brittle

paper clips : This used to hold papers together it is made of a thin elastic wire

The design parameters to be considered are : length of the wire, material to be used and the elasticity of the material

advantages : it is quite cheap and good strength

disadvantages :it can hold a limited amount of papers together

potato chip bag clips: These clips are used on potato chip bags to ensure that the bags are air tight

The design parameters to be considered are : Elasticity of the material to be used , and size

Advantages : it helps to prevent the potato chips from getting exposed to air

disadvantages : Not very popular and its quite expensive

4 0
3 years ago
Other questions:
  • A thick steel sheet of area 150 in.2 is exposed to air near the ocean. After a one-year period it was found to experience a weig
    7·1 answer
  • How many paragraphs are good for an essay
    13·2 answers
  • Based on parameters such as the materials shear modulus, diameter of the wire, mean coil diameter, and number of active coils (a
    11·1 answer
  • How to draw the output voltage waveform rectifier
    8·1 answer
  • What is an OTG USB? how is it useful ​
    14·1 answer
  • You are using a Jupyter Notebook to explore data in a DataFrame named productDF. You want to write some inline SQL by using the
    8·1 answer
  • What is your opinion on environmental art? Do you consider it art? What about the trans-species art you read about? Do you think
    9·2 answers
  • Ow is squeezing toothpaste out of a tube of toothpaste similar to peristalsis?
    12·1 answer
  • Engineering Specificaitons is ...
    9·1 answer
  • What is the approximate average power output of a well-designed modern turbine in Des Moines, Iowa with a 10 m2 swept area and 5
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!