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
Zigmanuir [339]
4 years ago
13

A developer has the following class and trigger code:public class InsuranceRates {public static final Decimal smokerCharge = 0.0

1;}trigger ContactTrigger on Contact (before insert) {InsuranceRates rates = new InsuranceRates();Decimal baseCost = XXX;}Which code segment should a developer insert at the XXX to set the baseCost variable to the value of the class variable smokerCharge?
A. Rates.smokerCharge
B. Rates.getSmokerCharge()
C. ContactTrigger.InsuranceRates.smokerCharge
D. InsuranceRates.smokerCharge
Computers and Technology
1 answer:
deff fn [24]4 years ago
4 0

Answer:

InsuranceRates.smokerCharge

Explanation:

To set the baseCost variable to the value of the class variable smokerCharge, the developer needs to replace

Decimal baseCost = XXX;

with

Decimal baseCost = InsuranceRates.smokerCharge;

This is done using the class reference type.

The smokerCharge should be declared in the InsuranceRates class, at first.

For example Ball b;

And then, a new instance of the object from the class is created, using the new keyword along with the class name: b = new Ball();

In comparing to the example I gave in the previous paragraph, the object reference in the program is:

InsuranceRates rates = new InsuranceRates();

Because the smokerCharge is coming from a different class, it can only be assigned to the variable baseCost via the InsuranceRates class to give:

Decimal baseCost = InsuranceRates.smokerCharge;

You might be interested in
Compute change
Illusion [34]

Answer:

Explanation:

The following code is written in Java and modified to do as requested. It asks the user to enter a number that is saved to the amountToChange and then uses the % operator to calculate the number of 5 dollar bills and the number of 1 dollar bills to give back. A test case has been provided and the output can be seen in the attached image below.

import java.util.Scanner;

class ComputingChange {

   public static void main(String[] args) {

       Scanner scnr = new Scanner(System.in);

       int amountToChange;

       int numFives;

       int numOnes;

       amountToChange = scnr.nextInt();

       numFives = amountToChange / 5;

       /* Your solution goes here */

       numOnes = amountToChange % 5;

       System.out.print("numFives: ");

       System.out.println(numFives);

       System.out.print("numOnes: ");

       System.out.println(numOnes);

   }

}

5 0
3 years ago
Which step is first in changing the proofing language of an entire document?
Korvikt [17]

Answer:

b) Select the whole document by pressing Ctrl+a.

Explanation:

The correct answer is b. If you do not select the whole document or parts of the document you wish to change the proofing language for, it will only be applied to the word your cursor is positioned in.

ig:ixv.mona :)

3 0
3 years ago
The following is the pseudocode for which type of algorithm? For start = each array subscript, from the first to the next-to-las
Snezhnost [94]

Answer:

Sorting Algorithm

Explanation:

Here we are arraigning the elements in ascending order. Using for loop we are iterating through all the elements. in one iteration the first minimum element in the list is at 1st place and in the second iteration the second minimum element is in 2nd position and so on

8 0
3 years ago
Another word for asking a question of your data is to _____ it.
Temka [501]

Answer:

query

Explanation:

7 0
2 years ago
Which of these sedimentary rocks is made of the largest particles?
Marta_Voda [28]
Your answer is <span>A.conglomerate.

Hope this helps :)</span>
6 0
4 years ago
Other questions:
  • Consider the following program segment. ifstream inFile; //Line 1 int x, y; //Line 2 ... //Line 3 inFile &gt;&gt; x &gt;&gt; y;
    13·1 answer
  • 30 POINTS!!
    15·2 answers
  • You notice your glove is torn; what should you do
    14·2 answers
  • What acronym describes networked devices that contain microcomputers but are not thought of as computing devices, such as refrig
    9·1 answer
  • When communicating with a server on another subnet, which of the following settings is used to determine which direction it need
    6·1 answer
  • What is thhe name of service included with windows server operating systemthat manages a centralized database containing user ac
    5·1 answer
  • Which key(s) will launch the Spelling Checker dialog box? F8 F7 Ctrl+H F2
    11·2 answers
  • How many tens are there in the number 156?<br> A. 1<br> B. 15<br> C. 6<br> D. 56
    7·2 answers
  • After you create a pie chart, you can move it to its own chart sheet.
    9·1 answer
  • To create a cell reference in another spreadsheet you must need to start with _______ sign.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!