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
Art [367]
2 years ago
7

Which of the following statements invokes the GetDiscount function, passing it the contents of two Decimal variables named decSa

les and decRate? The statement should assign the function's return value to the decDiscount variable.a. decDiscount = Call GetDiscount(decSales, decRate)b. Call GetDiscount(decSales, decRate, decDiscount)c. decDiscount = GetDiscount(decSales, decRate)d. none of the above
Computers and Technology
1 answer:
ryzh [129]2 years ago
3 0

Answer:

c. decDiscount = GetDiscount(decSales, decRate)                                                                                                                          

Explanation:

Option a. is incorrect because it is using Call word which is not a valid way to invoke a function.

Similarly option b. is also incorrect because it uses Call word to invoke function GetDiscount() which is not a valid way to call a function and also it is passing it the contents of three variables decSales, decRate and decDiscount and as mentioned in the question only two parameters are to be passed to GetDiscount() function.

Option c. is correct as it invokes the function GetDiscount() and passes it the contents of two variables decSales and decRate and assigns this to a variable decDiscount. For example if the GetDiscount() method has to calculate the discount using decSales and decRate then the resultant value of this computation is assigned to decDiscount. So whatever this function returns or computers is assigned to and stored in decDiscount variable. So this is a valid way to invoke a method.

You might be interested in
6. The following is a dump of a DATA chunk in hexadecimal format. 00000015 00000005 0003000A 00000000 48656C6C 6F000000 a. Is th
ryzh [129]

Answer:

Explanation:

a) taking 00000005, it is a 13th bit which is 0, and therefore, we'd call it an ordered chunk

b) taking 00000005 again, it is 14th (B) and 15th (E) bits are 0 and so we'd call it a middle fragment

c) 00000015 is equal to 21, it is not a multiple of 4, and as such, it needs 3 padding bytes

d) 00000005 is equal to 5 making it a TSN. So the TSN is 5

e) taking 0003, we can then say the SI is 3

f) taking 000A, the SSN is then 10

g) the message is 48656C6C

6 0
2 years ago
RAM is usually a. secondary storage b. a static type of memory, used for permanent storage c. a volatile type of memory, used fo
PolarNik [594]

Answer:

The correct answer to the following question will be Option C (Volatile type of memory).

Explanation:

Random Access Memory, a variety of computer's memory which could be retrieved accidentally i.e., some memory can be obtained without any of the previous bytes being touched.

  • Volatile memory is a type of a storage in computer that only retains its information or data while powering the appliance.
  • Almost all of the RAM used in Pc's for the primary storage is unstable storage.

So, Option C is the right answer.

8 0
3 years ago
1. Create a constructor definition that has two parameters, a manufacturer’s brand and a screen size. These parameters will brin
katen-ka-za [31]

Answer:

C++.

Explanation:

#include <iostream>

#include <string>

using namespace std;

////////////////////////////////////////////////////////////

class Television {

   string brand;

   float screen_size;

   bool powerOn;

   int volume;

   int channel;

   

public:

   // Comments

   Television(string brand, int screen_size) {

       this->brand = brand;

       this->screen_size = screen_size;

       powerOn = false;

       volume = 20;

       channel = 2;

   }

   //////////////////////////////////////////

   // Comments

   int getVolume() {

       return volume;

   }

   

   // Comments

   int getChannel() {

       return channel;

   }

   

   // Comments

   string getManufacturer() {

       return brand;

   }

   

   // Comments

   float getScreenSize() {

       screen_size;

   }

   ///////////////////////////////////////////

   // Comments

   void setChannel(int channel) {

       this->channel = channel;

   }

   

   // Comments

   void power() {

       if (!powerOn)

           powerOn = !powerOn;

   }

   

   // Comments

   void increaseVolume() {

       volume = volume + 1;

   }

   

   // Comments

   void decreseVolume() {

       volume = volume - 1;

   }

};

3 0
3 years ago
What is the simplest unit of a compound that maintains all the characteristics of the compound<br> ?
vlada-n [284]
A molecule is the simplest unit of a compound.
3 0
2 years ago
Business application software programs make it possible to
Daniel [21]
Business application software programs make it possible to: increase productivity in the office setting.
Please give me Brainless if this help!!
6 0
2 years ago
Other questions:
  • How do humans feel about being abducted?
    12·2 answers
  • Write a routine to interchange the mth and nth elements of a singly-linked list. You may assume that the ranks m and n are passe
    10·1 answer
  • Last week, a disk containing CSM Tech Publishing’s current project manuscripts crashed. Fortunately, there was a backup, but all
    15·1 answer
  • Design a function that checks if a keyword exists in a given keyword tree and returns true if so and returns false otherwise. Af
    13·2 answers
  • When you send an email to your professor, a server holds that email until the professor requests it.
    8·1 answer
  • The
    6·1 answer
  • If a filesystem has a block size of 4096 bytes, this means that a file comprised of only one byte will still use 4096 bytes of s
    12·1 answer
  • What are the significances of blogs?
    7·2 answers
  • A transistor may be used as an amplifier in an electronic circuit. <br> Select one: True False
    12·1 answer
  • What are the two biggest strength as a student
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!