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
High level language is___________
lara31 [8.8K]

Answer:

B. Machine dependent and machine oriented pls mark me branilest

8 0
3 years ago
What does it mean to have 2 warnings on brainly and what if i get another one?
steposvetlana [31]
By giving wrong answers or cheating I guess
5 0
3 years ago
Read 2 more answers
There u go i did thereeeeeeeeeeeeeeeeeeeeeee
Alika [10]
Awwww u cutie pie:)) thanks for showing me how to screenshot
3 0
3 years ago
Read 2 more answers
Research the history of Internet in computers<br><br>​
solniwko [45]

Answer:

This allowed different kinds of computers on different networks to "talk" to each other. ARPANET and the Defense Data Network officially changed to the TCP/IP standard on January 1, 1983, hence the birth of the Internet. All networks could now be connected by a universal language.

3 0
2 years ago
A Pool charges $4 each visit,or you can buy a membership. Write and solve an inequality to find how many times a person should u
MAXImum [283]
$4 x number of visits (V)> price of membership (M)
V > M/4
8 0
4 years ago
Other questions:
  • Each peripheral device has its own software, called a(n) ____, which contains the detailed instructions required to start that d
    6·1 answer
  • Given a one dimensional array arr, what is the correct way ofgetting the number of elements in arr
    15·1 answer
  • A virus that is triggered when certain logical conditions are met, such as opening a file or starting a program a certain number
    10·1 answer
  • Attributes of a website indicates a more reliable source of information
    14·1 answer
  • Many Web browsers allow users to open anonymous windows. During a browsing session in an anonymous window, the browser does not
    14·1 answer
  • Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binar
    13·1 answer
  • Generate a row vector b=[1 2 3 4 5 6 7 8 9 10] using linspace function, give the commands and show print-screen of the result.
    11·1 answer
  • A company decides to relocate its operations to another state in order to take advantage of some new business investment credits
    15·1 answer
  • ​what is the difference between a normal mouse and trackball? What do you think. ​​​​
    7·1 answer
  • You're asked to recommend potential data structures to use as the backing for implementing Kruskal's algorithm. Which of the fol
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!