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
Digital Subscriber Line (DSL) is a way for traditional telephone companies to provide Internet access a way for traditional cabl
zvonat [6]

Answer:

Option A is correct

Digital Subscriber line is a way where telephone companies provide internet access for connection.

It is a communication medium used to transfer digital signals. DSL is one of the most popular broadband internet access.

Explanation:

DSL stands for Digital Subscriber Line. DSL works with high-speed bandwidth that connects from a phone jack to a telephone network. DSL works within frequencies. You can use the DSL while making phone calls.

6 0
3 years ago
Read 2 more answers
Which formal security-related process should take place at the beginning of the code creation project? Group of answer choices R
Igoryamba

Answer:

Risk assessment, Input validation and Output validation.

Explanation:

Software development life cycle, SDLC, is a systematic process a software being created must pass through or follow, from the stage of conception to death of the application.

There are various processes that occurs at the beginning of SDLC, a few of the activities are risk management, input and output validation.

Risk management is used to determine the feasibility, usefulness and profitability to cost of the software before development. The input and output validation is for security control access to the data of the software.

3 0
3 years ago
How should the administrator enable users with permissions to use einstein analytics features
wariber [46]

Answer:

Einstein analytics plus user

Explanation:

Einstein data insights is a platform that can be used by a company to analyse Salesforce report. With a subscription to this platform, an administrator can grant limited access to users in the company and monitor the logs and reports.

To grant a user access to Einstein data insights, go to setup and find permission set on the quick find box, on the "permission set", click on "einstein analytics plus user", then click on "manage assignment | add assignment". Add the users you want and then click on "assign".

4 0
3 years ago
¿Cuáles son los 5 Procesadores de textos on line más usados?
labwork [276]

Answer:

5 Procesadores de textos

Explanation:

Google Docs.

Textilus - Edición Microsoft Word.

TextEdit.

Kingsoft Office Writer.

Páginas.

8 0
3 years ago
(true or false) fortnite is the best?
GarryVolchara [31]

Answer:

FALSE ZzZzZzZz

Explanation:

Cus it is PERIOT

7 0
3 years ago
Read 2 more answers
Other questions:
  • What does pagination mean in Microsoft Word?
    10·2 answers
  • How do you adjust the shear of a shape?
    10·2 answers
  • Which best describes the benefits of renting a home?
    10·2 answers
  • Sending a employee an email with important criticism represents a problem which communication process
    9·1 answer
  • Rint "Censored" if userInput contains the word "darn", else print userInput. End with newline.
    11·1 answer
  • __________ is the order of arrangement of files and folders.
    6·1 answer
  • How old was the mummy where they found a wooden prosthetic toe on him?
    6·1 answer
  • You’re having trouble connecting to the Internet so you call your Internet service provider for help. They need to know the perm
    15·1 answer
  • Globalization is based on <br>​
    10·1 answer
  • Help ne please!! Even if I press 3 times it doenst work.. when I try to turn it off either. Any suggestions? (using ipad)​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!