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
Giving brainliest to the Person finishes this song lyric.
muminat

Answer:

the man on the silver mountain

Explanation:

because it can

5 0
2 years ago
Read 2 more answers
1. Which of the following are considered CAD powerhouses?
allsm [11]

Answer:

1. D.Autodesk and microstation.

2. D. the creation of a computer model, paricularly for purposes of studying.

3. A.internet delivered through standard household phone lines.

4. C.3-D sculptures used to pray for fertility.

5. C.technology.

Explanation:

8 0
3 years ago
(25 POINTS)Which statement best reflects the importance of following safety guidelines?
jeyben [28]

Answer:

I think, Every year, thousands of people die as a result of workplace injuries.

6 0
3 years ago
Read 2 more answers
2. What type of expansion card allows your computer to
nekit [7.7K]

You can use a peripheral component interconnect Express card (also known as an expansion card) to connect your computer to a wireless network (WLAN).

I hope this helped!

3 0
3 years ago
The ________ is the biggest power consumer on a mobile computing device.
AleksandrR [38]

The part of a computing device that is the biggest power consumer is;

Central Processing Unit

<h3>Central Processing Unit</h3>

The part of a computing device that cosnumes the most power is called the Central Processing Unit (CPU). This is due to the following reasons;

  • The CPU consists of motherboard and battery that draws power from the socket.

  • The Mother board is equipped with logic gates that are used to implement logic in the computer.

  • The Logic gates are voltage signals that signify the binary information that are fed into the system.

Read more about Central Processing Unit (CPU) at; brainly.com/question/4558917

5 0
2 years ago
Other questions:
  • Steve wants to become a successful graphic design entrepreneur. Which entrepreneurial approach will help him succeed? A. working
    14·1 answer
  • Write a program to calculate how much to tip a waiter person based on the quality of service. The script file should ask for the
    12·1 answer
  • When writing a personal narrative, what point of view would be best to use? (1 point) first person second person third person th
    10·2 answers
  • What is the internet?
    5·2 answers
  • Provide the instruction type, assembly language instruction, and binary representation of instruction described by the following
    7·1 answer
  • What does Data storage enable a browser to do
    5·1 answer
  • Which Numpy function do you use to create an array? (Points : 1) np
    5·1 answer
  • Is the jane austen pride and prejudie a primary source
    6·1 answer
  • Plato Web Tech B Semester Test- I'll mark brainiest for answers to ALL
    9·1 answer
  • What was used to enhance silent films of the early 1900s
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!