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
When designing a car that runs on wind or Air car . can you tell me the details for the following points Compressed Air Engine:
BabaBlast [244]

Answer:

a)

The crack and connecting rod is used in the design of car.This mechanism is known as slider -crank mechanism.

Components:

1.Inlet tube

2. Wheel

3. Exhaust

4. Engine

5.Air tank

6.Pressure gauge

7.Stand

8. Gate valve

b)

The efficiency of air engine is less as compare to efficiency of electric engine and this is not ecofriendly because it produce green house gases.These gases affect the environment.

c)

it can run around 722 km when it is full charge.

                                                                                                                                                     

5 0
3 years ago
Which of the following are hazards associated with portable ladders?
PilotLPTM [1.2K]

Answer:

A,C, and D

Explanation:

Potible ladders have to configure with many designs in mind but the most evedent is that they are usally unstable

BRAINLIEST PLS

7 0
3 years ago
Read 2 more answers
If a heat engine has an efficiency of 30% and its power output is 600 W, what is the rate of heat input from the combustion phas
jarptica [38.1K]

Answer:

The heat input from the combustion phase is 2000 watts.

Explanation:

The energy efficiency of the heat engine (\eta), no unit, is defined by this formula:

\eta = \frac{\dot W}{\dot Q} (1)

Where:

\dot Q - Heat input, in watts.

\dot W - Power output, in watts.

If we know that \dot W = 600\,W and \eta = 0.3, then the heat input from the combustion phase is:

\eta = \frac{\dot W}{\dot Q}

\dot Q = \frac{\dot W}{\eta}

\dot Q = \frac{600\,W}{0.3}

\dot Q = 2000\,W

The heat input from the combustion phase is 2000 watts.

8 0
2 years ago
Bending is defined as? A. the application of a load tending to distort a member in one direction. B. the application of opposing
amm1812
Hi how are you today
4 0
2 years ago
Steep safety ramps are built beside mountain highway to enable vehichles with fedective brakes to stop safely. a truck enters a
Veronika [31]

Answer:

a. 6 seconds

b. 180 feet

Explanation:

Images attached to show working.

a. You have the position of the truck so you integrate twice. Use the formula and plug in the time t = 7 sec. Check out uniform acceleration. The time at which the truck's velocity is zero  is when it stops.

b. Determine the initial speed. Plug in the time calculated in the previous step. From this we can observe that the truck comes to a stop before the end of the ramp.

7 0
3 years ago
Other questions:
  • What is the difference between absolute and gage pressure?
    11·1 answer
  • How fast is a 2012 nissan sentra<br>speed and acceleration ​
    15·1 answer
  • A liquid's viscosity increases with increasing temperature. a)-True b)-False
    6·1 answer
  • A pressure gage at the inlet to a gas compressor indicates that the gage pressure is 40.0 kPa. Atmospheric pressure is 1.01 bar.
    5·1 answer
  • Write a method printShampooInstructions(), with int parameter numCycles, and void return type. If numCycles is less than 1, prin
    15·1 answer
  • What is the advantage of Sensabot over human inspectors?
    12·1 answer
  • What did Congress do in 1787 to settle land disputes among the settlers?
    11·1 answer
  • Sarah and Raj take/takes me to a baseball game every year.
    11·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
  • Agricultural economics is a study of how agriculture and business are related.<br> False<br> True
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!