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
Doubling the diameter of a solid, cylindrical wire doubles its strength in tension.
julsineya [31]

Answer:

True ❤️

-Solid by solid can make Cylindrical wire doubles Strengths in tension

4 0
3 years ago
A. Calculate the concentration of a toxic (Cout) that is added to a lake with an input concentration of 100 μg/l. The flow rate
Mazyrski [523]

Answer:

Calt =42.129 mg/eit

Explanation:

See attached image

5 0
3 years ago
A rigid tank contains 3 kg of water initially at 43.97% quality and at a temperature of 120°C. The water is heated until it reac
makkiz [27]

Explanation: see attachment below

6 0
3 years ago
Explain the working and performance of a centrifugal clutch with a sketch​
FinnZ [79.3K]

Answer:

A centrifugal clutch works, as the name suggests, through centrifugal force.

One of the most common methods is by mounting the clutch onto the parallel or taper crank shaft of the engine.

When the crank shaft rotates the shaft of the clutch rotates at the same speed as the engine

5 0
3 years ago
Read 2 more answers
An equation used to evaluate vacuum filtration is Q = ΔpA2 α(VRw + ARf) , Where Q ≐ L3/T is the filtrate volume flow rate, Δp ≐
larisa86 [58]

Answer:

Explanation:

The explanations and answers are shown in the following attachments

6 0
3 years ago
Other questions:
  • If a car sits out in the sun every day for a long time can light from the sun damage the car paint
    10·2 answers
  • How I do I get nut out of sheets​
    8·2 answers
  • The sum ofall microscopic forms of energy of a system is quantified as flow energy. a)True b) False
    5·1 answer
  • A plate clutch is used to connect a motor shaft running at 1500rpm to shaft 1. The motor is rated at 4 hp. Using a service facto
    7·1 answer
  • A type 3 wind turbine has rated wind speed of 13 m/s. Coefficient of performance of this turbine is 0.3. Calculate the rated pow
    12·1 answer
  • The value read at an analog input pin using analogRead() is returned as a binary number between 0 and the maximum value that can
    14·1 answer
  • A 220-V electric heater has two heating coils that can be switched such that either coil can be used independently or the two ca
    15·1 answer
  • Two production methods are being compared. One manual and the other automated. The manual method produces 10 pc per hour and req
    14·1 answer
  • Storing parts outside doesn't cause any environmental risks as long as the items are covered.
    12·2 answers
  • A wheel spins at a constant angular speed of 24rad/s.How many revolutions will the dosk go through in 5minutes?​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!