answer.
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]
1 year 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]1 year 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
When long labels are required, which of these commands can you use to improve readability of a worksheet?
Morgarella [4.7K]
I believe it is wrap text! Hope this helped
6 0
2 years ago
Read 2 more answers
Explain why Windows and Linux implements multiple locking mechanisms. Describe the circumstances under which they use spinlocks,
galben [10]

Answer:

The description for the given question is described in the explanation section below.

Explanation:

Depending on the needs of the device programmers these OS have various locking frameworks. Spinlocks become beneficial for preemptive multitasking processes during which a thread will operate in such an active loop instead of risking a rest queue latency. Mutexes become beneficial to utility lockers.

  • Solaris 2 employs flexible mutexes, indicating something like this on preemptive multitasking computers, the mutex is introduced with either a spinning switch.
  • Semaphores and state variations are much more effective methods for consistency where a commodity needs to be managed for such a prolonged period of time because spinning is unstable over a prolonged time.

8 0
1 year ago
Mile markers appear as _____ green signs.
german

Answer:

A.Big,Rectangular

Explanation:

mile markers are sign on high ways they are green signs they are big and rectangular shape

6 0
1 year ago
Read 2 more answers
Match common encryption algorithms and methods with the scenarios representing real-world business applications and requirements
Sladkaya [172]

The question is incomplete as the scenarios are not given that were to be matched by the given encryption algorithms.

By finding the question from internet i have attached the image of the scenarios in the form of table and answered below accordingly

<h2>Answer:</h2>

<u>Scenario A:</u>

Advanced Encryption Standard (AES) is a technique that uses 256-bit cipher texts for encryption process. The data encrypted by AES cannot be attacked and even it cannot be decrypted unless a brute-force search is used through all of possible 256-bit keys.For mobile security it is known as one of the best algorithms.

<u>Scenario B:</u>

Following are the techniques of encryption used for given scenario:

  • ECC
  • Digital Signature
  • AES
  • Blowfish

<u>Scenario C:</u>

Following are the techniques of encryption used for given scenario:

  • ECC
  • Blowfish

<u>Scenario D:</u>

Secure Sockets Layer (SSL) - SSL is a protocol that is commonly-used for managment of the message transmission security over the Internet)

<u>Scenario E:</u>

Advanced Encryption Standard (AES) - AES is an encryption algorithm used by U.S. Government agencies for securing sensitive but unclassified material .

i hope it will help you!

5 0
1 year ago
Leah wants to create a PowerPoint presentation for a history report about the progressive era in the 1900s. To
Nutka1998 [239]

Answer:

File

Explanation:

8 0
1 year ago
Read 2 more answers
Other questions:
  • Which of the following word pairs correctly completes the sentence below?
    15·2 answers
  • ____ is a program placed on a computer without the user's knowledge that secretly collects information about the user
    14·1 answer
  • Classify the given items as belonging to the public domain or protected by copyright law.
    6·2 answers
  • In a system containing CPU 1 and Disk Drive A, the system is instructed to access Track 1, Track 9, Track 1, and then Track 9 of
    12·1 answer
  • Mike has never used a slide software before, but he needs to create a presentation by the end of the week. what recourse would b
    8·1 answer
  • Insert the missing code in the following code fragment. This fragment is intended to call the Vehicle class's method. public cla
    14·1 answer
  • Sensors and devices connected to a model are examples of which of the following?
    6·2 answers
  • A company moves a popular website to a new web host. Which of the following will change as a result?
    15·1 answer
  • g 18.6 [Contest 6 - 07/10] Reverse an array Reversing an array is a common task. One approach copies to a second array in revers
    8·1 answer
  • A program is divided into 3 blocks that are being compiled on 3 parallel computers. Each block takes an Exponential amount of ti
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!