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
Stream Piracy – Kaaterskill, NY. Check and double-click the Problem 15 folder. The dark blue and orange streams highlight the pr
baherus [9]

Answer:

b. The pirating streams are eroding headwardly to intersect more of the other streams’ drainage basins, causing water to be diverted down their steeper gradients.

Explanation:

From the Kaaterskill NY 15 minute map (1906), this shows two classic examples of stream capture.

The Kaaterskill Creek flow down the east relatively steep slopes into the Hudson River Valley. While, the Gooseberry Creek is a low gradient stream flowing down the west direction which in turn drains the higher parts of the Catskills in this area.

However, there is Headward erosion of Kaaterskill Creek which resulted to the capture of part of the headwaters of Gooseberry Creek.

The evidence for this is the presence of "barbed" (enters at obtuse rather than acute angle) tributary which enters Kaaterskill Creek from South Lake which was once a part of the Gooseberry Creek drainage system.

It should be noted again, that there is drainage divide between the Gooseberry and Kaaterskill drainage systems (just to the left of the word Twilight) which is located in the center of the valley.

As it progresses, this divide will then move westward as Kaaterskill captures more and more of the Gooseberry system.

5 0
3 years ago
Identify an object in your house that contains a physical system and list three questions you could use to define the system
jonny [76]

Answer:

ALL CAREFULLY ANSWERED CORRECTLY

Explanation:

1) A loaf of Bread PHYSICAL SYSTEM

✓ How can the environment affect the edibility of the bread

✓ What are the constituents that makes up the bread

✓ What process is involved in these constituents mixing to form the loaf.

2) The law of thermodynamics makes us to understand that when heat/energy passes through a system, the systems internal energy changes with respect to the conservation of energy law. That is energy lost = energy gained. Typically, ice would melt in a cup of hot tea because of the thermal energy in the molecules of the hot tea. When you heat a material, you are adding thermal kinetic energy to its molecules and usually raising its temperature. The temperature of the ice raises due to the kinetic energy added to it and it melts to water.

3) The theory of systems view the world as a complex system of interconnected parts. If we consider the society; (financial systems, political systems, etc) we will agree that they individually have their own components and it's the summation of this components that makes the system, this implies that system thinking could be applicable in this kinda of systems as long as they are made up of components.

4) Technology has boosted every sector of our lives and it has the capacity to do more. Restricting it's importance to entertainment alone would be an underusing of its potentials. Engineering students infact should not need any drive to be encouraged about maximizing all it can do in shaping our world.

5) ~ Nature shows its splendid soul

~Never ceases to leave us in amazement

~And we are in love

4 0
3 years ago
What do you own that might not be manufactured?
horrorfan [7]

Answer:

A pet

Explanation:

Latin time I checked animals aren't made by people? I honestly don't know if this helps but I'm technically not wrong.

8 0
3 years ago
5 cause of a electrical problem​
cupoosta [38]

Answer:

1. Poor circuit protection

2.Grounding issue

3. lighting problem

4. Electrical shocks

5. High electricity bills

Explanation:

8 0
3 years ago
A buret is a device designed to precisely dispense liquids. The scale is calibrated in mL with the zero point at the top with nu
kobusy [5.1K]

Answer:

As there was no attached picture, I will explain how to take the measurement of liquids in any buret which you can then apply to the specific question

Explanation:

A buret is a  laboratory apparatus used to precisely measure the volume of liquids (usually alkalise or bases) used in a titration experiment. The standard buret has a capacity of 50 ml  and graduated in 0.1ml though burets with smaller capacities exist.

From the question, your buret is filled to the top (0.00ml) with liquid. It is very important when taking buret readings to place the buret below your eye level so that the bottom meniscus (lower part of the liquid) can be read.

To take the buret reading, note your initial buret reading (in this case 0.00ml) then titrate the liquid base in the buret against the acid by opening the tap located at the bottom of the buret.

When the titration or reaction is complete, note the final reading against the calibration of buret. You can do this by observing the lower meniscus of the liquid remaining in the buret. (Remember to keep the buret at eye level  to avoid parallax error),

The difference between your final buret reading and the initial buret reading gives you the precise volume of liquid used in the reaction.

6 0
3 years ago
Other questions:
  • The development team recently moved a new application into production for the accounting department. After this occurred, the Ch
    6·1 answer
  • A large prime number isP = 232582657 - 1
    8·1 answer
  • Global Courier Services will ship your package based on how much it weighs and how far you are sending the package. Packages abo
    14·1 answer
  • (a) Design a first-order passive high-pass filter with a cutoff frequency of 1000 rad/sec.
    8·1 answer
  • An object is supported by a crane through a steel cable of 0.02m diameter. If the natural swinging of the equivalent pendulum is
    6·1 answer
  • In designing a fixed-incline self-acting thrust pad when the width of the pad is much larger than the length, it is of interest
    10·1 answer
  • How large a force is required to accelerate a 1300 kg car from rest to a speed of 20 m/s in a distance of 80 m?
    15·2 answers
  • Plz give solutions..... ​
    6·1 answer
  • During the pre-drive check, you'll want to observe the car from the _______.
    9·1 answer
  • PLEASE HELP QUICK!!
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!