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
____ grinders are used to grind diameters, shoulders, and faces much like the lathe is used for turning, facing, and boring oper
skelet666 [1.2K]

Answer:

Cylindrical

Explanation:

<em>A cylindrical grinder </em><em>is a tool for shaping the exterior of an item. Although cylindrical grinders may produce a wide range of forms, the item must have a central axis of rotation. Shapes such as cylinders, ellipses, cams, and crankshafts are examples of this.</em><em> Cylindrical grinding</em><em> machines are specialized grinding machines that are used to process cylinders, rods, and similar workpieces. The cylinders revolve in one direction between two centers, while the grinding wheel or wheels are close together and rotate in the other direction.</em>

8 0
2 years ago
How buy airpods in my phone​
Levart [38]

U mean how to connect them to your phone?

4 0
3 years ago
Read 2 more answers
Products that are in the process of being manufactured but are not yet complete are called:
vazorg [7]

Answer:

Those products are generally called Work in Process WIP

Explanation:

Work in process (WIP), or work in progress (WIP), goods in process, or in-process inventory in a manufacturing industry/company refer to the company's partially finished goods waiting for completion and eventual sale or the value of these items.

These items are either just being produced or require further processing (like purification, separation, packaging or handling) in a queue or a buffer storage.

6 0
3 years ago
List all the qualities of an engineer?
Dennis_Churaev [7]

Answer:

Math and Computer Skills. A qualified engineer should be good at math, at least through the level of calculus and trigonometry, and understand the importance of following the data when making design decisions.

Organization and Attention to Detail.  

Curiosity.  

Creativity.  

Critical Thinking.

Intuition.

Explanation:

6 0
3 years ago
Shows a closed tank holding air and oil to which is connected a U-tube mercury manometer and a pressure gage. Determine the read
damaskus [11]

Answer:

P_2-P_1=27209h

Explanation:

For pressure gage we can determine this by saying:

The closed tank with oil and air has a pressure of P₁ and the pressure of oil at a certain height in the U-tube on mercury is p₁gh₁. The pressure of mercury on the air in pressure gauge is p₂gh₂. The pressure of the gage is P₂.

P_1+p_1gh_1=p_2_gh_2+P_2

We want to work out P₁-P₂: Heights aren't given so we can solve it in terms of height: assuming h₁=h₂=h

P_1-P_2=p_1gh_1-p_2gh_2=(55)\cdot{32.2}h-845\cdot{32.2}h

P_2-P_1=27209h

3 0
4 years ago
Other questions:
  • The period of a pendulum T is assumed to depend only on the mass m, the length of the pendulum `, the acceleration due to gravit
    9·1 answer
  • A stainless steel ball (rho = 8055 kg/m3, cp = 480 J/kg·K) of diameter D = 0.21 m is removed from the oven at a uniform temperat
    9·2 answers
  • Draw an ERD for each of the following situations. (If you believe that you need to make additional assumptions, clearly state th
    15·1 answer
  • Matthew wants to manufacture a large quantity of products with standardized products having less variety. Which type of producti
    5·1 answer
  • A force of 16,000 will cause a 1 1 bar of magnesium to stretch from 10 to 10.036 . Calculate the modulus of elasticity in . (Ent
    6·1 answer
  • If you are involved in a collision and your vehicle is blocking the flow of traffic, you should
    5·1 answer
  • Please help me with this. Picture
    10·1 answer
  • Estimate the luminosity of a 3 -solar-mass main-sequence star; of a 9 -solar-mass main-sequence star. Can you easily estimate th
    5·1 answer
  • Oleg is using a multimeter to test the circuit branch you just installed. After turning off the current to the circuit at the se
    5·1 answer
  • 6.) ___________ is a disadvantage of local storage since it can be very expensive.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!