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
Kryger [21]
3 years ago
12

Create an application named SalesTransactionDemo that declares several SalesTransaction objects and displays their values and th

eir sum. The SalesTransaction class contains fields for a salesperson name, sales amount, and commission and a readonly field that stores the commission rate. Include three constructors for the class. One constructor accepts values for the name, sales amount, and rate, and when the sales value is set, the constructor computes the commission as sales value times the commission rate. The second constructor accepts a name and sales amount, but sets the commission rate to 0. The third constructor accepts a name and sets all the other fields to 0. An overloaded + operator adds the sales values for two SalesTransaction objects.
Computers and Technology
1 answer:
crimeas [40]3 years ago
8 0

Answer:

Explanation:

The following code is all written in Java, first I will add the object initialization and declaration code that can be added to the main method of any program. Then I have also written the entire SalesTransaction class as the question was not clear as to exactly which was needed.

//Object Creation to copy and paste into main method

SalesTransaction sale1 = new SalesTransaction("Gabriel", 25, 5);

SalesTransaction sale2 = new SalesTransaction("Daniela", 5);

SalesTransaction sale3 = new SalesTransaction("Jorge");

//SalesTransaction class with three constructors

package sample;

class SalesTransaction {

   String name;

   int salesAmount, commission;

   private int commissionRate;

   public SalesTransaction(String name, int salesAmount, int rate) {

       this.name = name;

       this.salesAmount = salesAmount;

       this.commissionRate = rate;

       commission = salesAmount * rate;

   }

   public SalesTransaction(String name, int salesAmount) {

       this.name = name;

       this.salesAmount = salesAmount;

       this.commissionRate = 0;

   }

   public SalesTransaction(String name) {

       this.name = name;

       this.salesAmount = 0;

       this.commissionRate = 0;

   }

}

You might be interested in
Please help me on this match all this up i’ll give you brainlist
Tresset [83]

Answer:

its in the picture

8 0
2 years ago
Read 2 more answers
Internally, computers are constructed from circuitry that consists of small on/off switches. What is the most basic circuitry-le
attashe74 [19]

Answer:

Machine Language.

Explanation:

The most basic language that is used by computers so that they can control the operation of the on/off switches  in the circuitry is Machine language.

Machine Language is a low level language is a collection of binary digits or bits that is understood by the computers.Computers are capable of understanding only machine language.

3 0
3 years ago
Consider the concept of cultural lag. Identify two American values that are “lagging.” What are three norms that are lagging? Ho
shepuryov [24]

Answer:

The cultural lag describes what actually takes place in the social system when the ideals that governs the society are not able to keep pace with the advances that are most of the time, but not actually always the technological advances. There norms are life support, stem cell research and findings, and cancer vaccines when we deal with American society, which is quite the fastest to keep pace with the technological advancement in general. Its possible now technologically to keep a person alive than he normally lives, but society still needs to accept this. The others are similar, and hence the other two norms. United States is a developed civilization, however still the life after death has not been accepted, however, extended life is definitely a possibility now. Its is quite expected however that soon it is going to be accepted. Hence, its a matter of time only, but since it has been not accepted till now it is a cultural lag. Stem cell research is also a similar situation. But soon it will be accepted as well.  Hence, US can be supposed to be the most advanced society, and the above cultural lags are for the time being only, and soon will be accepted. None of the other countries, you can expect these to be accepted currently. That is why US is the most advanced society of the world. However, some ethical conflicts and crisis still exist, but it will be removed soon, which is expected.

Explanation:

The answer is self explanatory.

7 0
3 years ago
The set of instructions that directs the computer to perform a variety of tasks is known as a
Vilka [71]
Answer: software (answer not long enough)
5 0
3 years ago
The advancement in speed of transportation is attributed to invention of this device
morpeh [17]
The automobile is the invention
3 0
3 years ago
Other questions:
  • How did the discovery of glossopteris support wegner's continental drift hypothesis?
    15·1 answer
  • Fill in the blank. Do not abbreviate.
    6·1 answer
  • Forms are used to a provide a more user-friendly way to work with data in tables
    14·1 answer
  • One blog may have a greater social influence than another when it has_______?
    12·2 answers
  • HIPAA requires the following controls for medical records: A. Encryption of all data B. Technical safeguards C. Physical control
    12·1 answer
  • The __________ method can determine whether a string contains a value that can be converted to a specific data type before it is
    12·1 answer
  • Write a C++ program that determines if an integer is a multiple of 7. The program should prompt the user to enter and integer, d
    13·1 answer
  • Write a method named printGPA that takes in as a parameter a Scanner to read in user input, and calculates a student's grade poi
    8·1 answer
  • Look at (c), is it accurate? ​
    9·2 answers
  • Please answer this question​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!