Answer and Explanation:
The ways in which a layered pattern make use of encapsulation and abstraction are as follows:
- This framework lays its focus mainly on the bundling of related functionalities inside an application into different layer that are vertically stacked over one another.
- Functionality in between each layer is related by common function or role.
- Communication in between the layers is clear and exact and is coupled loosely.
- Providing a layered structure to the application indirectly supports its maintainability and flexibility.
Encapsulation:
Since, features like data type, properties, methods or implementation while designing are not exposed at the boundary of the layer thus No assumptions are required for these features.
Abstraction:
The layered framework abstracts the entire system's view and provides adequate details for better understanding of the roles of each layer individually and the relation that exist between these layers.
Answer:
yes! of course and sure! okay
It formed <span>about 4.5 billion years ago</span><span> </span>
Answer:
string=""
while string not in {"Quit","quit","q"}:
string=input("Enter line to be reversed") #line of text will be entered
if string!="Quit" and string!="quit" and string!="q": #If quit is not entered
print("Reverse of line is : ")
print(string[::-1])
OUTPUT :
Enter line to be reversedThis code is in python language
Reverse of line is :
egaugnal nohtyp ni si edoc sihT
Enter line to be reversedHello world
Reverse of line is :
dlrow olleH
Enter line to be reversedquit
Explanation:In the above program, First a while loop is executed and checked if line of text is not 'quit', 'Quit' or 'q'. If condition is true, then loop is executed and in python any string or list can be traversed from end if step is given -1. Similarly line of text is accessed from the last element. If quit is entered, then the program will be broken out of the loop.