there is an error with the hash map variable
i wish i had any idea what this is
i wish i had any idea what this is
By “this” do you mean the entire thread? Have you used object oriented programming in any context?
Did you input a valid object? It errors if you don’t put a valid object.
Problems in the key finder block
Look at the definition of key finder block using hash maps:
Problem 1. The input slot variable name is misspelled.
The input slot variable name for the hash map input is hashmap, but the name of the input slot variable you used is hash map.
hashmap is not the same input slot variable name hash map, resulting to the following problem: a variable of name 'hash map' does not exist in this context.
The conclusion is that the input slot variable name for the hash map input must be renamed to hash map.
Problem 2. The script variable name is different from the used variable name.
The script variable name for the hash map input is a-list, but the name of the input slot variable you used is location.
a-list is not the same input slot variable name location, resulting to the following problem: a variable of name 'location' does not exist in this context.
The conclusion is that the script variable name for the hash map input must be renamed to location, using the rename all... option.
Problems in The entire OOP Project
It’s not working if I fix the errors appeared in the project.
Fixed!
JSYK, you do not have to make your messages professional in the forums.
It might be an AI translating tool, but I might be wrong.
Probably :/
hey, sorry to bring this up here, but i’ve gotten some updates made on the music ADT visuals, i just can’t bump the topic because of the 2 reply limit, so i edited my last post instead :)
i’ll probably delete this post once the other topic gets bumped up again, sorry for being off-topic!!
I’m bumping it now!
Bug report
There are many bugs in the Hybrid OOP v2.0 project. Could you see this so that you can see more context about the bugs? This is the project containing the tests for Objects and Classes.
Tests
-
Tests 1~3 are test about the Objects. The object starts with a new object with key
Key3being stored from the valueValue 3, with the following parents:- New object with key
Key1being stored from the valueValue 1. - New object with key
Key2being stored from the valueValue 2.
Then, the first test inspects the key
Key1of the object, and the second test inspects the keyKey2, and so on. - New object with key
-
Tests 4~6 are test about the Classes, The class starts with a new class with the property
Property 3stored to the valueValue 3, with the following parents:- New class with property
Property1being stored from the valueValue 1. - New class with property
Property2being stored from the valueValue 2.
Then, the fourth test inspects the property
Property1of the object, and so on.But, it seems tests 4~6 are failed because of the class initialization bugs.
- New class with property
You found one error, but everything else is just bad coding on your part.
WHAT DID YOU EXPECT THIS TO DO?!? This would work if the roots had an empty list of parents instead of a non-object one
_ ← _ sets a field accesible to the entire class. You mean
Then is this code right? (Thanks for fixing the code!)
OOP 2.0 is officially released! Abstract classes coming soon!
Is this code about abstract classes?
abstract class Person {
constructor(public name: string) {}
think(): void {
console.log(`${this.name} is thinking`);
}
abstract research(): void;
}
class Student extends Person {
research(): void {
console.log(`${this.name}: I'm studying right now`);
}
}
const myself = new Student('AverageN632');
myself.think(); // AverageN632 is thinking
myself.research(); // AverageN632: I'm studying right now
This has nothing to do with Snap!. And you don’t need to “implement” an abstract class to mark it as an instance. Abstract classes are duck types.
What? Do Abstract classes quack at you when you do something wrong?
You don’t know what duck typing is?
Nope. Haven’t even googled it. (I probably will have to, though)
I just hope duck typing wasn’t secretly invented by swans.
Alright, so you want to see if a class qualifies as a duck. Instead of seeing if it inherits from some duck class, you just check if it has a method named “quack”.



