Question
In still water, a boat can cover 30 km in 90 minutes.
Speed of the stream is 20% of the speed of the boat in downstream. Find the time taken by the boat to cover 18 km in upstream.Solution
ATQ, Let the speed of the stream be 's' km/h. Speed of the boat in still water = (30/90) X 60 = 20 km/h So, downstream speed of the boat = '(20 + s)' km/h ATQ, Speed of stream = 's' = 0.20 X (20 + s) Or, s = 4 + 0.2s Or, s - 0.2s = 4 Or, 0.8s = 4 So, 's' = 5 km/h Upstream speed of boat = 20 - s = 20 - 5 = 15 km/h Required time = 18 ÷ 15 = 1.2 hours
Which special method is automatically called when an object of a class is created, typically used for initializing the object's state?
What is the main purpose of an interface in OOP?
Which of the following is a common way to achieve abstraction in OOP?
The concept of showing only essential features of an object and hiding the complex implementation details is called:
What is a "method" in the context of OOP?
An abstract class:
Which access modifier restricts access to a class member only within the class itself and its derived classes?
In OOP, a blueprint for creating objects (a particular data structure), providing initial values for state (member variables or attributes), and impleme...
How is data hiding primarily achieved in OOP?
Which type of polymorphism is achieved through method overloading (where multiple methods have the same name but different parameters)?