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
SMAW and GMAW use constant current arc welding machines.<br><br> True<br><br> False
Oksi-84 [34.3K]
It is true. Good luck
4 0
3 years ago
Technician A says that excessive end play causes rapid wear of the sealing rings and possibly the sealing ring groove. Technicia
DerKrebs [107]

Answer:

Technician A only

Explanation:

Rapid wear of the sealing ring and the seal ring groove are result of excessive end play

7 0
3 years ago
Match the types of AI to the correct automation tasks.
Maru [420]

Answer:

Theory of Mind : A robotic head has a face that recognizes and simulates emotions.

Self aware : A robot tries to protect itself from harm

Purely Reactive : A door automatically opens when a person steps in front of it.

Limited Memory : A personal assistant software tracks a persons travel routes and suggests shorter routes.

Explanation:

Artificial intelligence is simply a technology which enables automation. It enables system perform task without being explicitly controlled. Purely reactive systems do not store Data in memory, it simply observes what going on at the moment which is what it was programmed to do and takes a step. One the machine detects someone approaching up to a certain distance, it opens.

Limited Memory systems store information about the past and this enhances its Decison making, prediction engines, self driving cars use this kind of artificial intelligence.

Theory of Mind : Here, systems are trained to detect, understand and replicate what is understood. Once the robot identifies an emotion, it replicates it.

Self - Aware : An advanced level of AI, where systems will not only be able to replicate what they see, but also make conscious decisions as to which action to take in different circumstances.

5 0
3 years ago
An asphalt concrete mixture includes 94% aggregate by weight. The specific gravities of aggregate and asphalt are 2.65 and 1.0,
garik1379 [7]

Answer:

2.0%

Explanation:

Percentage of aggregate = 94%

Specific gravity = 2.65

Specific gravity of asphalt = 1.9

Density of mix = 147pcf = 147lb/ft³

Total weight of mix: (volume = 1ft³)

= (147lb/ft³)(1ft³)

= 147lb

Percentage weight of asphalt in<u> mix:</u>

100% - 94%

= 6%

Weight of asphalt binders

= 6% x 147lb

= 8.82lb

Weight of aggregate in mix:

= 94% x 147

= 138.18lb

Specific weight of asphalt binder:

(Gab)(Yw)

Yw = specific Weight of water

= 62.4lb

Gab = specific gravity of asphalt binder

= 1.0

(62.4lb)(1.0)

= 62.4 lb/ft³

Volume of asphalt in binder:

8.82/62.4

= 0.14ft³

Specific weight of binder in mix:

2.65 x 62.4lb/ft³

= 165.36 lb/ft³

Volume of aggregate:

= 138.18/165.36

= 0.84ft³

Volume of void in the mix:

1ft³ - 0.84ft³ - 0.14ft³

= 0.02ft³

<u>The percentage of void in total mix:</u>

VTM = (0.02ft³/1ft³)100

= 2.0%

8 0
3 years ago
The substance is steam (H2O). NOTE: The purpose of this problem is to illustrate that there are conditions where water vapor is
Gennadij [26K]

Answer:

See the attached pictures for detailed answer.

Explanation:

See the attached pictures for step by step explanation.

7 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
  • A 1020 CD steel shaft is to transmit 15 kW while rotating at 1750 rpm. Determine the minimum diameter for the shaft to provide a
    10·1 answer
  • You can divide a surface by drawing a line through it
    9·2 answers
  • What is one of the most common ways workers get hurt around machines
    5·1 answer
  • Its an opinion!!!!
    8·1 answer
  • A car radiator is a cross-flow heat exchanger with both fluids unmixed. Water, which has a flow rate of 0.05 kg/s, enters the ra
    15·1 answer
  • An object at a vertical elevation of 20 m and a speed of 5 m/s decreases in elevation to an elevation of 1 m. At this location,
    15·1 answer
  • Describe how a cavity wall works and sketch its major construction features. What aspects of cavity wall construction are most c
    5·1 answer
  • How will the proposed study contribute to your career?*<br>(quantity Surveying​
    11·1 answer
  • Can someone please help me this is urgent!?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!