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
Steam enters an adiabatic condenser (heat exchanger) at a mass flow rate of 5.55 kg/s where it condensed to saturated liquid wat
Evgen [1.6K]

Answer:

The minimum mass flow rate will be "330 kg/s".

Explanation:

Given:

For steam,

m_{s}=5.55 \ kg/s

\Delta h=2491 \ kg/kj

For water,

\Delta T=10^{\circ}C

(Cp)_{w}=4.184 \ kJ/kg^{\circ}C

They add energy efficiency as condenser becomes adiabatic, with total mass flow rate of minimal vapor,

⇒  m_{s}\times (\Delta h)=M_{w}\times(Cp)_{w}\times \Delta T

On putting the estimated values, we get

⇒  5.55\times 2491=M_{w}\times 4.184\times 10\\

⇒  13825.05=M_{w}\times 41.84

⇒  M_{w}=330 \ kg/s

7 0
3 years ago
An air conditioning system operating on reversed carnot cycle is required to remove heat from the house at a rate of 32kj/s to m
Brilliant_brown [7]

Answer:

(e) 1.64 kW

Explanation:

The Coefficient of Performance of the Reverse Carnot's Cycle is:

COP = \frac{T_{L}}{T_{H}-T_{L}}

COP = \frac{293.15\,K}{308.15\,K-293.15\,K}

COP = 19.543

Lastly, the power required to operate the air conditioning system is:

\dot W = \frac{\dot Q_{L}}{COP}

\dot W = \frac{32\,kW}{19.543}

\dot W = 1.637\,kW

Hence, the answer is E.

3 0
3 years ago
I am trying to make a vacuum cannon but all I can use to get out the air is a speed pump to give air to bicycles. I need to make
Mrrafil [7]

We can actually deduce here that making a airtight seal will take different format. You can:

  • Use an epoxy-resin to create an airtight seal
  • Create a glass-metal airtight seal
  • Make a ceramic-metal airtight seal.

<h3>What is an airtight seal?</h3>

An airtight seal is actually known to be a seal or sealing that doesn't permit air or gas to pass through. Airtight seal are usually known as hermetic seal. They are usually applied to airtight glass containers but the advancement in technology has helped to broaden the materials.

We can see that epoxy-resin can used to create an airtight seal. They create airtight seals to copper, plastics, stainless steels, etc.

When making glass-metal airtight seal, the metal should compress round the solidified glass when it cools.

Learn more about airtight seal on brainly.com/question/14977167

#SPJ1

6 0
1 year ago
Define and discuss the difference between micronutrients and macronutrients. Also, discuss their importance in the body at rest
almond37 [142]

Answer:

Macronutrients are simply nutrients the body needs in a very high amount e.g Carbohydrate.

MicroNutrients are simply nutrients the body needs but in little amount e.g  Minerals.

Explanation:

So for further breakdown:

What are nutrients? Nutrients are essential elements that nourish the body in different capacities. We as humans get most of out nutrients from the food and water we ingest.

Now about Macro Nutrients: From the prefix "Macro" which means large, we can infer that macro nutrients are elements need by the body for the fundamental processes of the body, deficiency in this nutrients are very easy to spot. Examples are: Carbohydrates, Protein, Fats amd Water.

Micro Nutrients: In relation to macro nutrients this are elements that the body needs but are not needed in Large quantities. They mostly work like supporting nutrients. Most chemical activities like reaction that occur in the body are a function of micro nutrients. Defiencies in micrp nutrients may take some time to spot e.g Minerals and Vitamins

In regards to exercise: Macro nutrients are the essential ones here since they are the ones that generate energy. PS: micro nutrients dont generate energy.

In regards to rest: Both the Macro and Micro Nutrients are essentail for the overall well being of the body.

5 0
3 years ago
AC motor characteristics require the applied voltage to be proportionally adjusted by an AC drive whenever the frequency is chan
Margarita [4]
The answer is false
6 0
3 years ago
Read 2 more answers
Other questions:
  • Exercise 19
    15·1 answer
  • Annealing is a process by which steel is reheated and then cooled to make it less brittle. Consider the reheat stage for a 100-m
    14·1 answer
  • All circuits need three basic parts: an energy source, wires, and the object that is going to change the electrical energy into
    5·2 answers
  • Determine the total condensation rate of water vapor onto the front surface of a vertical plate that is 10 mm high and 1 m in th
    8·2 answers
  • If a particle moving in a circular path of radius 5 m has a velocity function v = 4t2 m/s, what is the magnitude of its total ac
    15·2 answers
  • Define the terms (a) thermal conductivity, (b) heat capacity and (c) thermal diffusivity
    11·1 answer
  • The branding, packaging, and labeling of your product should accomplish all of the following except
    12·1 answer
  • If a fuel line is routed through a compartment parallel with an electrical wire bundle, the fuel line should be installed ______
    7·1 answer
  • A heating element for a cooking appliance is stretched too far during installation. What action can be performed? A. Dispose of
    7·1 answer
  • Why not just put all the set up steps within each step? it is because we want to keep our code __ ? (3 letters)
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!