+ 2

Fill in the blanks ????

Fill in the blanks to instantiate an object of the class Cat, passing to the constructor the value 12. Then call the Meow method for that object: Cat c= Cat(); Meow0;

5th Jun 2018, 12:12 PM
ARs Dev
ARs Dev - avatar
9 ответов
+ 15
Cat c = new Cat(12); c.Meow(); You can find explanations in the comments to the lessons.
5th Jun 2018, 12:24 PM
NezhnyjVampir
+ 1
Fill in the blanks to instantiate an object of the class Person, passing the value 42 to it. Then call the "speak" method for that object. Answer ob = Person.new (42) ob.speak
21st Nov 2020, 6:16 AM
Jason Chew
Jason Chew - avatar
+ 1
Drag and drop from the options below to define a module Test, which includes a class method "sum". Then call the method. Answer: module Test def self.sum #some code end end Test.sum
21st Nov 2020, 6:25 AM
Jason Chew
Jason Chew - avatar
+ 1
Cat c = new Cat( 12 ); c. Meow();
24th Apr 2021, 7:08 AM
Md. Rakibul Islam
Md. Rakibul Islam - avatar
0
Fill in the blanks to define a module "Stuff", with a class method "shuffle" and call it. Answer: module Stuff def self.shuffle end end Stuff.shuffle
21st Nov 2020, 6:19 AM
Jason Chew
Jason Chew - avatar
0
Fill in the blanks to create a Proc called sum that takes two parameters and outputs their sum. Call it for values 8 and 5. Answer: sum = Proc. new do |x, y| puts x + y end puts sum.call 8, 5
21st Nov 2020, 6:23 AM
Jason Chew
Jason Chew - avatar
0
Cat c = new Cat(12); c.Meow();
18th Nov 2021, 10:15 PM
Fernando Omar Arciniega Martinez
Fernando Omar Arciniega Martinez - avatar
0
Fill in the blanks to create a function outputting the sum of the two parameters. add(x, y) {
7th Aug 2022, 3:26 PM
SANTOSH KUMAR YADAV
- 1
Fill in the blanks to make the code work
13th Mar 2021, 4:49 AM
Tran Phuoc Sinh
Tran Phuoc Sinh - avatar