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
Karo-lina-s [1.5K]
3 years ago
9

Write a class named Add that has the following data members, constructor, and methods:

Computers and Technology
1 answer:
taurus [48]3 years ago
7 0

Answer:

A class is like a blueprint of object.

Explanation:

A class defines the kinds of data and the functionality their objects will have.

A class enables you to create your own custom types by grouping together variables of other types, methods and events.

In C#, we can create a class  using the class keyword.

Here's a sample program:

using System;

namespace ConsoleApplication

{

   public class Test

   {

       public static void Main()

       {

           Add a1 = new Add(70, 50);

           a1.AddNumbers();                    

           Console.ReadLine();

       }      

   }

     class Add

   {

       private int row;

       private int column;

       public Add(int r, int c)

       {

           row = r;

           column = c;

       }

       public void AddNumbers()

       {

           Console.WriteLine(row+column);

       }

   }

}

output: 120

Explanation of the program:

I have created a class named Add. Within a class, row and column are two fields and AddNumbers() is a method. We also have constructor to initialize row and column.

In main method, If I need to invoke members of the class, I must create  an instance of the class. We can create any number of instances using the single class.IN our program, a1 is the reference variable using which we can invoke members of the class. I invoked function in the class and passed arguments to the constructor while creating an instance.

Those values are assigned to method variables and it operated the addition. Thus the output is 120.

You might be interested in
What is the unit of information called when a network adapter adds the source and destination mac address to the segment of data
Blababa [14]
MAC addresses are part of the header that's put on the packet.
3 0
3 years ago
Jenny is working on a laptop computer and notices that the computer is not running very fast. She looks and realizes that the la
nirvana33 [79]

Answer:

SO-DIMM DDR3

Explanation:

Based on the information provided within the question it can be said that the module that Jenny needs to order is known as SO-DIMM DDR3. This is the type of module that would work on her laptop computer. DDR3 is the most common generation of these RAM modules and SO-DIMM are rams that support 72, 100, 144, or 204 pins and is alot smaller than regular DIMM modules, coming in at about 3 inches.

8 0
3 years ago
What type of code do computers typically use to operate? A. CSS B. HTML 5 C. HTML D. Binary
Ugo [173]

Answer:

D. Binary

Explanation:

Computer hardware parts are built on transistors, small electrical devices that switch electrical signals and amplify power. The CPU (Central Processing Unit), the "brain" of the computer, has billions of tiny transistors <em>alone</em>.

These transistors read binary, a code made up of 1's and 0's. This code tells what the computer to do.

CSS, HTML, and HTML 5 apply to web pages and web page designs, not code for the computer.

The OS (operating system) that your computer runs is coded in C++ (Windows) or C (Linux)

4 0
3 years ago
The purpose of the ________ element is used to configure the headings for a web page document or section of a web page document.
Vesnalui [34]
The answer would be "Inspect"
7 0
4 years ago
A.
FrozenT [24]

Answer:

b. the action is not allowed.

Explanation:

Traffic signs are established rules and regulations designed to direct and guide commuters and other road users.

A red circle and diagonal slash on a sign simply means that the action is not allowed.

A hortatory technique is focused on encouraging, exhorting and urging people to do that which is right, acceptable and worthy of emulation by others.

For example, commuters and road users are being urged not to litter the highway with thrash, waste, or dirt, in order to protect the planet from environmental degradation and pollution. This would help in conserving and mitigating risks posing as a threat to our dear planet and habitat.

Hence, a hortatory technique in policy implementation and enactment is primarily aimed at appealing to the sense and conscience of individuals, to engage in socially responsible acts.

7 0
3 years ago
Other questions:
  • An example of software is
    9·2 answers
  • Most modern TCP implementations use pseudo-random number generators (PRNG) to determine starting sequence numbers for TCP sessio
    13·1 answer
  • You are part of a testing team at a software business. Your job is to see how many concurrent users the system can host and how
    7·1 answer
  • Can someone help me to give this guy brainliest the button is not there
    8·1 answer
  • Write a program whose input is two integers and whose output is the two integers swapped. Ex: If the input is: 3 8 the output is
    5·1 answer
  • How do you detect my account for brainly?
    14·1 answer
  • Online education provides _____.
    8·1 answer
  • The formula in cell C9 is B9*F10. On copying this formula to cell Z9, what will be the formula​
    5·1 answer
  • An organized file title helps save time locating files, communicates professionalism, and lets us know the file is most likely N
    10·1 answer
  • state how to transfee information from website to el processing document in computers and technology.​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!