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
Based on the graphs of stress-strain from the V-MSE site, how would you characterize the general differences between polymers an
Pepsi [2]

Answer:

Option A

Explanation:

Alloys are metal compounds with two or more metals or non metals to create new compounds that exhibit superior structural properties. Alloys have high level of hardness that resists deformation thereby making it less ductile compared to polymers. This is due to the varying difference in the chemical and physical characteristics of the constituent metals in the alloy.

6 0
3 years ago
When a person has the ability to move a vehicle, they have ____________________.
sergiy2304 [10]

(Energy ) i think .....

4 0
4 years ago
Nancy wants to buy a cooking stove that’s electrically insulated and resistant to heat. What material should she choose for the
astra-53 [7]

Answer:

Ceramics

Explanation:

Ceramics are used to make cooktops if you look it up and according to my engineering and design class ceramics have high heat resistance and melting points, and make good electrical insulators.

3 0
3 years ago
Disadvantage of metal
ivolga24 [154]
You can get hurt if u don’t use it properly.
7 0
3 years ago
Is it possible to pass in a course if I passed in its prerequisites without understanding most about them?​
MAXImum [283]

Answer:

I don't think so but you could  remember  little bit and  you could pass.

Explanation:

4 0
2 years ago
Other questions:
  • Use the convolutional integral to find the response of an LTI system with impulse response ℎ(????) and input x(????). Sketch the
    8·1 answer
  • The four strokes in a four stroke cycle engine in proper order.
    7·1 answer
  • An uncovered swimming pool loses 1.0 inch of water off its 1,000 ft^2 surface each week due to evaporation. The heat of vaporiza
    14·1 answer
  • Do YOU have big brain?
    15·2 answers
  • 4.68 Steam enters a turbine in a vapor power plant operating at steady state at 560°C, 80 bar, and exits as a saturated vapor at
    15·1 answer
  • Although many countries have issues with soil erosion due to deforestation, some of the most serious effects are seen
    8·1 answer
  • Imagine waking up every day and no one is home besides your dog and you how would you feel?
    12·2 answers
  • For many clients, a decision is based primarily on time and money, which are the two most abundant
    10·2 answers
  • 6.3. A __________ is used to indicate the base material that needs to be beveled.
    12·1 answer
  • It is given that 50 kg/sec of air at 288.2k is iesntropically compressed from 1 to 12 atm. Assuming a calorically perfect gas, d
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!