1322L Practice Bank (1).docx - Taken from Codewars Module 2 Question 1 Let's do the laundry Your room is a mess full of dirty clothes You finally

# 1322L Practice Bank (1).docx - Taken from Codewars Module 2...

• Test Prep
• 7

This preview shows page 1 - 3 out of 7 pages.

Taken from Codewars: Module 2: Question 1:Let's do the laundry!Your room is a mess full of dirty clothes. You finally decided to take them to the laundry basket (after you mom told you a thousand times). Your mom is so delightful that she washes them for you.She noticed some of the clothes are forged... and decides to dispose the washed off clothes.Forged clothes (IForged) are washed off after 25 times and normal clothes 40 times.Complete the Laundry class so it can fill a list of IClothing by calling FillLaundryBasket and has a function LetMotherWashTheClothes to process and "wash" the clothes.After that, you have to write a function GetSpecificClothes wich is a generic function that returnsthe total of clothes that is asked for. The available type of clothes are ISock, ITrowser, IShirt.Note: you do not need to increase the WashedCount property on a piece of clothing. Available clothing: SportSocks, SilkSocks, ShortTrowsers, ShortSleevedShirt, LongSleevedShirtQuestion 2:There exists a preloaded abstract class named Operation:C#public abstract class Operation{ public double Result; public abstract void Execute(double variable1, double variable2);}Javaabstract class Operation{ double result; abstract void execute(double variable1, double variable2);}
Your job is to create 4 new classes which inherit the 'Operation' class. Within the class, create the proper execute method and save the mathematical operation to the proper result variable. The class names must be as follows: Question 3:You have to detect if the person is a Police Officer or a Spy :D There is an abstract class named "Human" with just one property which is "Name". "Name" is a string. There are two other classes named "Police" and "Spy" that inherit from Human class.Complete the FindHisIdentity method, so it returns a string that tell the identity of the person: the output string should be like this: "'Name of the person' is a 'real identity of the person'"Module 4:Question 1:Kate finds herself in a maze. Help her to find a way out!For a given maze and Kate's position find if there is a way out. Your function should return True or False.