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
Elena-2011 [213]
3 years ago
6

I need help on this ASAP, worth 93 points

Computers and Technology
2 answers:
Ugo [173]3 years ago
6 0

Answer:

I think I is b yeah it is b/c I took that test and u was b

kramer3 years ago
4 0

Answer:

the answer is B

Explanation:

You might be interested in
Type (dog, cat, budgie, lizard, horse, etc.) Create a class that keeps track of the attributes above for pet records at the anim
Alenkinab [10]

Answer:

If you did the exercise with two Dog objects, it was a bit boring, right? After all, we have nothing to separate the dogs from each other and no way of knowing, without looking at the source code, which dog produced which bark.

In the previous article, I mentioned that when you create objects, you call a special method called a constructor. The constructor looks like the class name written as a method. For example, for a Dog class, the constructor would be called Dog().

The special thing about constructors is that they are the path to any new object, so they are a great place to call code that initializes an object with default values. Further, the return value from a constructor method is always an object of the class itself, which is why we can assign the return value of the constructor to a variable of the type of class we create.

However, so far, we have not actually created a constructor at all, so how come we can still call that method?

In many languages, C# included, the language gives you a free and empty constructor without you having to do anything. It is implied that you want a constructor; otherwise there would be no way of using the class for anything, so the languages just assume that you have written one.

This invisible and free constructor is called the default constructor, and, in our example, it will look like this:

public Dog(){ }

Notice that this syntax is very similar to the Speak() method we created earlier, except that we do not explicitly return a value nor do we even declare the return type of the method. As I mentioned earlier, a constructor always returns an instance of the class to which it belongs.

In this case, that is the class Dog, and that is why when we write Dog myDog = new Dog(), we can assign the new object to a variable named myDog which is of type Dog.

So let’s add the default constructor to our Dog class. You can either copy the line above or, in Visual Studio, you can use a shortcut: type ctor and hit Tab twice. It should generate the default constructor for you.

The default constructor doesn’t actually give us anything new because it is now explicitly doing what was done implicitly before. However, it is a method, so we can now add content inside the brackets that will execute whenever we call this constructor. And because the constructor runs as the very first thing in an object’s construction, it is a perfect place to add initialization code.

For example, we could set the Name property of our objects to something by adding code such as this:

public Dog()

{

   this.Name = "Snoopy";

}

This example will set the Name property of any new objects to “Snoopy”.

Of course, that’s not very useful because not all dogs are called “Snoopy”, so instead, let us change the method signature of the constructor so that it accepts a parameter.

The parentheses of methods aren’t just there to look pretty; they serve to contain parameters that we can use to pass values to a method. This function applies to all methods, not just constructors, but let’s do it for a constructor first.

Change the default constructor signature to this:

public Dog(string dogName)

This addition allows us to send a string parameter into the constructor, and that when we do, we can refer to that parameter by the name dogName.

Then, add the following line to the method block:

this.Name = dogName;

This line sets this object’s property Name to the parameter we sent into the constructor.

Note that when you change the constructor’s signature, you get a case of the red squigglies in your Program.cs file.When we add our own explicit constructors, C# and .NET will not implicitly create a default constructor for us. In our Program.cs file, we are still creating the Dog objects using the default parameter-less constructor, which now no longer exists.

To fix this problem, we need to add a parameter to our constructor call in Program.cs. We can, for example, update our object construction line as such:

Dog myDog = new Dog(“Snoopy”);

Doing so will remove the red squigglies and allow you to run the code again. If you leave or set your breakpoint after the last code line, you can look at the Locals panel and verify that your object’s Name property has indeed been? Got it?

5 0
2 years ago
Why are 90% of questions not being answered im scrolling through the questions. Most are not being answered except the easy ques
Anna [14]
I actually have this problem all the time. Rarely any of my questions get answered and I see this happening to other people all the time. It's crazy. 
5 0
3 years ago
Read 2 more answers
Explain how chord works. To increasing the fault tolerance in chord, each node maintains a successor list (finger table) instead
andrew11 [14]

Answer:

Chord is a set of rules for a peer-to-peer distributed hash table it collects key-value sets by allotting keys to several computers (known as "nodes"); a node will collect the values for all the keys for which that is reliable. Chord defines how keys are allocated to the nodes, and how a node can determine the value for a distributed key by first locating the node liable for such key.

Explanation:

A chord is a peer-to-peer lookup service. It Resolves the difficulty of establishing a data item in a combination of shared nodes, considering various node arrivals and removals The most crucial operation in most peer-to-peer method is the efficient position of data objects.

It is able of supporting only one operation i.e. given a key, it maps the key on a link.

Algorithm:

Algorithm shows working of the chord:

// x is a node used to find successor of id

x.find_successor(id)

if (id (x; successor])

return successor;

else

// query is being delivered around the circle

entrance successor.find_successor(id);

6 0
3 years ago
Hey i need some help with code.org practice. I was doing a code for finding the mean median and range. the code is supposed to b
geniusboy [140]

Answer:

https://studio.code.org/projects/applab/YGZyNfVPTnCullQsVfijy6blqJPMBOgh5tQ5osNhq5c

Explanation:

7 0
3 years ago
ONCE AGAIN Can somebody explain the difficulties and hardships of being a computer engineering?
Lynna [10]

Answer:

The only thing I can think of, is stress. I cannot tell you how frustrating it is when you're writing code and it decides to bug out because of some little mistake. For hours you're writing and find out that you're missing a single ";" or an indent.

When you're writing out code in order to solve a problem, you need to break it down step by step in order to actually write it. Otherwise, you'll miss a bunch of steps

6 0
2 years ago
Other questions:
  • The force that pulls away from a curve is known as
    9·1 answer
  • Is bit stuffing necessary in the control or address field in theHDLC protocol? why?
    13·1 answer
  • The transport layer protocol used by the tcp / ip suite that does not provide guarantees on ordering or confirmation of receipt
    7·1 answer
  • Name and describe the various features of the PC support pages of About.com.
    8·2 answers
  • A _____ is the useful part of a transmission through a network.
    15·1 answer
  • A device that make it possible for a muitiple customer to share one address is called
    13·1 answer
  • Kevin is working in the Tasks folder of his Outlook account. Part of his computer screen is shown below.
    14·1 answer
  • 31. Explain what the program does. Write out the output 20 PRINT "Hellooo00000000000, world!" 30 PRINT "I'm learning about comma
    7·1 answer
  • People of brainly Just a quick warning that there is a group of people posting links with virus.
    11·2 answers
  • A coworker is taking a computer overseas and asks you what concerns he should have. What do you tell him
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!