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
Luda [366]
3 years ago
12

First real answer i’ll give Brainlyist

Engineering
1 answer:
pochemuha3 years ago
6 0

Answer:

I think this answer is number B

You might be interested in
Create an abstract class DiscountPolicy. It should have a single abstract method computeDiscount that will return the discount f
eimsori [14]

Answer:

Java Code was used to define classes in the abstract discount policy,The bulk discount, The buy items get one free and the combined discount

Explanation:

Solution

Code:

Main.java

public class Main {

public static void main(String[] args) {

  BulkDiscount bd=new BulkDiscount(10,5);

BuyNItemsGetOneFree bnd=new BuyNItemsGetOneFree(5);

CombinedDiscount cd=new CombinedDiscount(bd,bnd);

System.out.println("Bulk Discount :"+bd.computeDiscount(20, 20));

  System.out.println("Nth item discount :"+bnd.computeDiscount(20, 20));

 System.out.println("Combined discount :"+cd.computeDiscount(20, 20));    

  }

}

discountPolicy.java

public abstract class DiscountPolicy

{    

public abstract double computeDiscount(int count, double itemCost);

}    

BulkDiscount.java  

public class BulkDiscount extends DiscountPolicy

{    

private double percent;

private double minimum;

public BulkDiscount(int minimum, double percent)

{

this.minimum = minimum;

this.percent = percent;

}

at Override

public double computeDiscount(int count, double itemCost)

{

if (count >= minimum)

{

return (percent/100)*(count*itemCost); //discount is total price * percentage discount

}

return 0;

}

}

BuyNItemsGetOneFree.java

public class BuyNItemsGetOneFree extends DiscountPolicy

{

private int itemNumberForFree;

public BuyNItemsGetOneFree(int n)

{

  itemNumberForFree = n;

}

at Override

public double computeDiscount(int count, double itemCost)

{

if(count > itemNumberForFree)

return (count/itemNumberForFree)*itemCost;

else

  return 0;

}

}

CombinedDiscount.java

public class CombinedDiscount extends DiscountPolicy

{

private DiscountPolicy first, second;

public CombinedDiscount(DiscountPolicy firstDiscount, DiscountPolicy secondDiscount)

{

first = firstDiscount;

second = secondDiscount;

}

at Override

public double computeDiscount(int count, double itemCost)

{

double firstDiscount=first.computeDiscount(count, itemCost);

double secondDiscount=second.computeDiscount(count, itemCost);

if(firstDiscount>secondDiscount){

  return firstDiscount;

}else{

  return secondDiscount;

}

}  

}

6 0
3 years ago
Are ocean currents always cold
swat32

Answer:

The surface ocean currents have a strong effect on Earth's climate. ... However, these areas do not constantly get warmer and warmer, because the ocean currents and winds transport the heat from the lower latitudes near the equator to higher latitudes near the poles.

8 0
3 years ago
What is the reason for the development of new construction of materials for human use? (Select all that apply.)
salantis [7]

Answer:

All 4 could be justified.

Explanation:

They all represent ultimate improvement.

7 0
3 years ago
What is the mode of operation of a ramp digital voltimeter​
liberstina [14]

Answer:

The operating principle of a ramp type digital voltmeter is to measure the time that a linear ramp voltage takes to change from level of input voltage to zero voltage (or vice versa).

7 0
1 year ago
What is a business cycle? a period of economic growth followed by economic contraction the amount of time it takes a business to
Rzqust [24]

Business cycle and its growth followed by economic contraction the amount of time it takes a business to produce products in the following way.

Explanation:

The business cycle is the periodic but irregular up-and-down movement in economic activity, measured by fluctuations in real gross domestic product (GDP) and other macroeconomic variables.

A business cycle is typically characterized by four phases—recession, recovery, growth, and decline—that repeat themselves over time.

Economists note, however, that complete business cycles vary in length. The duration of business cycles can be anywhere from about two to twelve years, with most cycles averaging six years in length.

FACTORS THAT SHAPE BUSINESS CYCLES

Volatility of Investment Spending

  • Variations in investment spending is one of the important factors in business cycles. Investment spending is considered the most volatile component of the aggregate or total demand (it varies much more from year to year than the largest component of the aggregate demand, the consumption spending), and empirical studies by economists have revealed that the volatility of the investment component is an important factor in explaining business cycles in the United States.

Momentum

Technological Innovations

Variations in Inventories

Fluctuations in Government Spending

Politically Generated Business Cycles

Monetary Policies

Fluctuations in Exports and Imports

7 0
3 years ago
Read 2 more answers
Other questions:
  • Alberto's mom is taking a splinter out of his hand with a pair of tweezers. The tweezers are 3 inches long. She is applying .25
    12·2 answers
  • Define the difference between elastic and plastic deformation in terms of the effect on the crystal lattice structure.
    5·1 answer
  • For a steel alloy it has been determined that a carburizing heat treatment of 7 hour duration will raise the carbon concentratio
    12·1 answer
  • If the outside diameter of a pipe is 2 m, the length of a piece of insulation wrapped around it would be a)- 628 cm b)- 12.56 m.
    15·1 answer
  • A square isothermal chip is of width w = 5 mm on a side and is mounted in a substrate such that its side and back surfaces are w
    7·1 answer
  • Kim is working on the cost estimate and feasible design options for a building. Which stage of a construction plan is Kim workin
    5·1 answer
  • NASA SPACE SHUTTLE QUESTION:
    14·1 answer
  • What is the following diagram called?
    15·1 answer
  • Need help with these 3 ez questions pls help me.
    6·1 answer
  • What is the difference between POP3 and IMAP?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!