hello guys in this room I’m gonna learn how to make an array and to get started let’s just make one so an array is basically a variable that can carry more than one variable so it’s basically like a variable that can it’s a basically an object that carries more than one variable it’s…
Tag: methods
Object Oriented Programming: Methods and Exceptions | C# 101 [18 of 19]
>>So in our last video, we actually introduced an exception into our code. Let’s take a closer look at that.>>So I went and tried to compile, and I’m being told that bank account balance cannot be assigned to. It’s read-only.>>Right.>>Yes. I thought it was clever because I made balanced a getter, but the initial balance,…
OSIsoft: Some Odd Scripting Syntax Explained . v1.3
You may see in syntactical use in our examples that does not seem to make sense at times. I would like to explain some of these. Most of these are just anomalies in Visual Basic. So let’s go over them briefly. First of all, sometimes you will see our methods are being used like functions….
Java #15 – Creating a Class
Java is an object-oriented language. Object-oriented means that you program by thinking about and describing the things, or objects that your program will model—that is, the data, instead of thinking in a process-oriented way. Java programs consist of a collection of classes, or blueprints, from which we create objects. The class describes the characteristics (called…
Picture Traversal – Intro to Java Programming
Now you’ve done this already, remember? When you changed all of the pixels from an image into the negative. At the time, I gave you the loop structure to do this, and I told you not to look too closely at it. Now, we’re ready to reveal this mystery. On your left we’re going to…
Drive – Intro to Java Programming
Here is the drive method. We increment the location and now we want to remove all passengers who wanted to get to that location. That turns out to be a bit tricky so I’ll want to find the passenger and then remove it. To remove a passenger I need to know the index. So I…
Calculating Circular Fields – Intro to Java Programming
A farmer has irrigation systems that work for circular fields. He wants to lay out the fields, so that he wastes as little land as possible and wastes no water at all. So, the fields can’t overlap and there can’t be factional fields because then he will be watering somebody else’s lands. He is looking…
Setting the Answer – Intro to Java Programming
let’s continue implementing the addChoice method. You’ve already done the first part, adding a new choice to the list of choices, now if this parameter here says that it was the correct choice then we should set the answer, and the answer should be a string 1, 2, 3 or 4 depending on whether this…
Using the Debugger 2 – Intro to Java Programming
You should get that three times. Let’s try it out. Run the program, here’s the initial break point, click on continue, supply the input and here we get to the break point for the first time. Click continue for the second time, for the third time and now our program has terminated.
Trying Out the this Reference – Intro to Java Programming
Here’s how I would fix the constructor. aNme would change to name, xCoord would change to just x, yCoord would change to just y. I have to change aName here, xCoord and yCoord. And now I need to make sure to write this.name equals name, this.x as x and this.y as y. I compiled and…