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
nydimaria [60]
3 years ago
14

Given the following class, what would be the best declaration for a mutator function that allows the user of the class to change

the age?
class Wine

{

public:

Wine();

int getAge();

float getCost();

private:

int age;

float cost;

}

a. int getAge(int newAge);

b. Wine();

c. void setAge();

d. void setAge(int newAge);
Computers and Technology
1 answer:
Inga [223]3 years ago
8 0

Answer:

Option D void setAge(int newAge);

Explanation:

In object oriented programming, mutator method is defined to change the value of the data member(s) in the class. Since the mutator method is aimed to change the value of a class data member, it is required to take in one new value as parameter to overwrite the existing value of data member. The mutator doesn't return any output. Hence, the best declaration for a mutator method to change the age is

void setAge(int newAge);

The new value of age is passed to parameter <em>newAge</em> and the <em>void </em>means the method doesn't return any value as output.

You might be interested in
Video digitization is the process of
Nonamiya [84]

Answer:

converting analog information into binary form, which can be more easily edited and shared

Explanation:

Digitization is conversion of data into digital format. Data is converted into small piece of storing unit called bits.  

Video digitization is the process of analog to digital conversion of video-graphic information. Analog signal is sampled based on its amplitude at uniformly distributed time period and then converted into binary data(bits) which is called digital data.

5 0
3 years ago
Read 2 more answers
Which are examples of primary sources? Check all that apply.
Marrrta [24]

Answer:

A, D, E

Explanation:

Diaries, photographs, and speeches are all forms of primary sources, whereas biographies and newspaper articles are written by a secondary source.

5 0
3 years ago
Read 2 more answers
Which software application is most appropriate for creating slideshows using text, charts, photographs, clip art, and video? dat
Daniel [21]
I'd say powerpoint I always use this to show graphs and stuff
4 0
3 years ago
Read 2 more answers
You make an online purchase of a hooded sweatshirt with the logo of the Dallas Cowboys. The next time you log on, your screen ha
Novosadov [1.4K]

Answer:

c. data mining

Explanation:

Data mining can be defined as the term which is used for knowing the user preferences by using their previous search queries.  

Nowadays Data mining is being used by many companies to predict and show them the appropriate ads in front of them on the basis of their previous search queries.

so, according to the scenario, the most appropriate answer is option C.

8 0
3 years ago
What two protocols are used for remote access to a server, using unencrypted and encrypted transmissions respectively? answer
drek231 [11]
Telnet or rsh and ssh, http and https, ftp and sftp or ftps ? How are you accessing the server?
8 0
3 years ago
Other questions:
  • Which of the following was the name of the first generation of cell phone networks?
    14·1 answer
  • T.J. wants to send a friend a file with a funny dancing cat. Which file format should T.J. use?
    13·2 answers
  • In python:
    14·1 answer
  • When is it most appropriate to quote from an e-mail message in a response?
    9·2 answers
  • What is the central idea of the second section:
    14·1 answer
  • Mr. O would like to purchase a new computer for his home business. Mr. O's current computer runs very slow when he is running e-
    5·2 answers
  • Def shared_motif(dna_list):
    13·1 answer
  • A sinewave has a period (duration of one cycle) of 645 μs. What is the corresponding frequency of this sinewave, in kHz, express
    8·1 answer
  • what is the term for software that is exclusively controlled by a company, and cannot be used or modified without permission?
    6·1 answer
  • What are tasks performed by pascaline?​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!