Stay on track with assessments and due dates each week.
Option B
Explanation
Straight-in parking is an approach of parking where vehicle is approached and parked safely in between the guiding lines. It thus helps to prevent blockage of cars. Each car can move in and out freely preventing it from congestion.
Straight-in parking is the most traditional approach of parking which saves time for drivers, allows for two-way traffic as well as driver can line up from multiple angles. Hence option B is the most appropriate one.
Answer: A) It is directly accessible only in B1
Explanation: In the given chunk of code, Class B1 is a base class. Class B2 is derived class of class B1. Class B3 is derived class of B2. As you can see class B1 has two members or instance variables i and j. Instance variable cannot be directly accessible by both B2 and B3. If you see this statement of the given code private int j; the keyword private is used with the variable j. This keyword is called access specifier. Access specifiers specifies how the members of a class can be accessed. These members are attributes and methods of that class. Any member of a class that are declared private cannot be inherited by derived classes of that class. Additionally these private members cannot be accessed from within any method inside derived class. So j is directly accessible only in B1. You can access a private instance variable from within the same class or can access it through the methods of class.
Answer:A
Explanation: I took the test !