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.
Hello there! The significance of the scientific method is that it ensures accuracy and it ensures that the experiment was done in the right order.
The scientific method is a widely accepted way of revising and rechecking the work of scientists to see if:
1. The answers match up
2. The experiment was performed correctly
3. The results are accurate
Through the scientific method, the probability is very high that things will not go wrong. The significance of this is that if the scientific method is not applied to an experiment, nobody knows the results. If nobody knows the results, there are many possible unintended consequences that could happen. Hope this helps!
Answer:
b.1
Explanation:
When we are using while loop to compute the product of several values we need to initialize the value holding the product to 1 because when we multiply something with 1 it will give the same number.
If we initialize it with 0 the product will come out to be 0 because anything multiplied by 0 is 0.
we cannot initialize it with NULL because it is not a pointer.
We need to initialize the number since it contains garbage values so it will give product with that value.
It may have been a songlyrics