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
Assoli18 [71]
1 year ago
8

assume a class named window has an accessor method named getwidth that accepts no parameters and returns an int. assume further

an array of 3 window elements named winarr, has been declared and initialized. write a sequence of statements that prints out the width of the widest window in the array.
Computers and Technology
1 answer:
worty [1.4K]1 year ago
5 0

The set and get functions are analogous to the accessor and mutator functions of C++. They are used in place of modifying a class member directly inside an object and making it public. An accessor function must be invoked in order to gain access to a private object member.

int mVal = winarr[0].getWidth();

for(int i = 1; i < winarrsize; i++)

{

  if(winarr[i].getWidth() > mxVal)

     mVal = winarr[i].getWidth();

}

cout << "The widest width is: "

<< mVal << endl;

By using encapsulation, a programmer can specify the labels for the data members and functions as well as whether or not other classes can access them. When data members are marked as "private," member functions of other classes cannot access or modify them which allows members access to these private data.

For a member such as Level, a function like GetLevel() returns the value of the member, while a function like SetLevel() gives it a value.

To learn more about Accessor Function click here:

brainly.com/question/13098886

#SPJ4

You might be interested in
Why would a business consider using virtual machines?
Nuetrik [128]
The answer is A, or To be able to maintain servers remotely. Why? Well, a business would not want to allow outside customers access to files because that’s a blatant red flag. There would be no reason to completely eliminate physical servers because there simply isn’t a reason to. They would not want to secure the company intranet because if they did, their solution would not be to use virtual machines surely.

Your final answer: To be able to maintain servers remotely. It’s slightly more efficient, and it makes sense for the company to be accomplishing this goal by using virtual machines.
7 0
2 years ago
22. Write the following in full un computer
exis [7]

Answers :

h. SATA : Serial Advanced Technology Attachment

i. DVI : Digital Visual Interface

k. EIDE : Enhanced Integrated Drive Electronics

l. AGP : Accelerated Graphics Port

m. GPU : Graphics Processing Units

n. HDMI : High-Definiton Multimedia Interface

o. ID10T : One-D-Ten-T

p. MOBO : Motherboard/Mainboard

Step-by-step explanation:

h. SATA, in full serial advanced technology attachment, also called serial ATA, an interface for transferring data between a computer's central circuit board and storage devices. SATA replaced the long-standing PATA (parallel ATA) interface.

i.Digital Visual Interface (DVI) is a video display interface developed by the Digital Display Working Group (DDWG). The digital interface is used to connect a video source, such as a video display controller, to a display device, such as a computer monitor.

k. Enhanced (sometimes "Expanded") IDE is a standard electronic interface between your computer and its mass storage drives. EIDE's enhancements to Integrated Drive Electronics (IDE) make it possible to address a hard disk larger than 528 Mbytes.

l. AGP, in full accelerated graphics port, graphics hardware technology first introduced in 1996 by the American integrated-circuit manufacturer Intel Corporation.

m. The graphics processing unit, or GPU, has become one of the most important types of computing technology, both for personal and business computing. Designed for parallel processing, the GPU is used in a wide range of applications, including graphics and video rendering.

n. High-Definition Multimedia Interface (HDMI) is a proprietary audio/video interface for transmitting uncompressed video data and compressed or uncompressed digital audio data from an HDMI-compliant source device, such as a display controller, to a compatible computer monitor, video projector, digital television,etc.

o.A. I. (IDIOT) A term often used by technical people to refer to human error. It enables them to talk to each other in front of an unsuspecting user; for example, "I think our friend here has a code ID 10 T error." Another spelling variation uses the digit "1" instead of the letter "I" (1D10T).

p.Motherboard (Mobo, MoBo, mobo), sometimes called the Mainboard, is the main printed circuit board in a computer or other electronic device. It's called a motherboard because it is the main circuit board in a computer. The features and services of motherboard can be extended by plugging other circuit boards into it.

6 0
3 years ago
Anyone wanna join a supercar/hypercar enthusiast's club?
stellarik [79]

Answer:

I have Lamborghini Centenario as my profile pic. :)

Explanation:

7 0
4 years ago
State what’s printed for each println in the code below:
allochka39001 [22]

Answer:

Explanation:

Each of the following println statements will print the following values

ystem.out.println(floozy); // Problem 1:   97.4

System.out.println(theObj.gravy); //Problem 2:  107.43

System.out.println(xray[2]); //Problem 3:  100

System.out.println(s); //Problem 4: Hello

This is because out of all of the variables that the myMethod gives a value to, the only variable that is being saved back to the global variable in the main method is a[2]. The other variables are being saved as instance variables and not being returned. Therefore, when the println statements are called they target the local variables in the main method.

7 0
3 years ago
How do we call a very small video,that is repeating unlimitedely
labwork [276]
A very small video that is continuous is called a GIF, which stands for Graphics Interchange Format.

 
3 0
3 years ago
Read 2 more answers
Other questions:
  • What will be displayed after the following statements have been executed? int x = 15, y = 26, z = 32; x = x + 12; y = y/6; z -=
    15·1 answer
  • You work for a large enterprise company that handles time-sensitive information. Your supervisor has asked that you set up a con
    8·1 answer
  • Which of these can be considered data?
    14·2 answers
  • Build a state diagram for the “book” based upon the following information of the library.
    6·1 answer
  • Which MLA web source citations are formatted correctly? Check all that apply.
    6·2 answers
  • There are main type of memory
    7·1 answer
  • Write a Python program that prints all the numbers from 0 to 6 except 3
    8·1 answer
  • Write a program that uses the Purchase class in 5.13. Set the prices to the following: Oranges: 10 for $2.99 Eggs: 12 for $1.69
    11·1 answer
  • When running the following code:
    10·1 answer
  • Cybersquatters:_________.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!