1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Gre4nikov [31]
4 years ago
5

. What is abstraction and encapsulation?

Computers and Technology
1 answer:
dmitriy555 [2]4 years ago
8 0

Answer:

Abstraction: Hiding data

Encapsulation: Combining both data and function as one unit.

Explanation:

Encapsulation and Abstraction are the concepts of object oriented programming language. Data Abstraction deals with hiding some confidential data and implementation details from the end user. Encapsulation refers to combining both data members and member functions as one unit.

we can achieve both encapsulation and abstraction in the from of class in object oriented programming language

You might be interested in
What are the core components of a computer system?
Fantom [35]
CPU GPU harddrive ram
6 0
3 years ago
Write a code segment that prints the food item associated with selection. For example, if selection is 3, the code segment shoul
Ganezh [65]

<em>Missing Part:</em>

<em>Assume that the following variables have been properly declared and initialized: an int variable named selection, where 1 represents "beef", 2 represents "chicken", 3 represents "pasta", and all other values represent "fish"</em>

Answer:

if selection == 1:

    print("beef")

elif selection == 2:

    print("chicken")

elif selection ==3:

    print("pasta")

else:

    print("fish")

Explanation:

I've completer the question and the questin will be answered in python.

   

This checks if selection is 1. If yes, it prints the beef

<em>if selection == 1:</em>

<em>     print("beef")</em>

This checks if selection is 2. If yes, it prints the chicken

<em>elif selection == 2:</em>

<em>     print("chicken")</em>

This checks if selection is 3. If yes, it prints the pasta

elif selection ==3:

    print("pasta")

Any other input is considered java/

else:

    print("fish")

4 0
3 years ago
Write a function max_magnitude() with two integer input parameters that returns the largest magnitude value. Use the function in
JulsSmile [24]

Answer:

def max_magnitude(user_val1, user_val2):

if abs(user_val1) > abs(user_val2):

return user_val1

else:

return user_val2

if __name__ == '__main__':

n1 = int(input("Enter the first integer number: "))

n2 = int(input("Enter the second integer number: "))

print("The largest magnitude value of", n1, "and", n2, "is", max_magnitude(n1, n2))

Explanation:

5 0
3 years ago
An online article in 2001 described a study in which twelve sixth-grade students who had not previously played chess participate
ipn [44]
Bdbxhdhdhdbxbdhdhxhxhdhdhdhdhdhdhdhdhdbdhdhdhdhdhdhrhrhrhrhrhdhdhdhdisisieiejjdidieieieieieiei
6 0
3 years ago
What does a close observation of the painting reveal? the people's enjoyment of fishing as a pastime the people's reliance on th
Lana71 [14]
The peoples reliance on the sea industry
6 0
4 years ago
Read 2 more answers
Other questions:
  • 2.3 Code Practice: Question 3
    14·1 answer
  • Astrid's computer screen suddenly says that all files are now locked until money is transferred to a specific account, at which
    11·1 answer
  • 1. What are the benefits and drawbacks of keeping separate journals for individual accounts?​
    8·1 answer
  • Which software development team memeber is responsible for the timeline and budget
    9·1 answer
  • Write MVCTester.java. When the program starts, the initial screen displays a button labeled "add", a blank text area, and a text
    14·2 answers
  • Given two integers as user inputs that represent the number of drinks to buy and the number of bottles to restock, create a Vend
    10·1 answer
  • Mathematics and computer science share many concepts.
    5·2 answers
  • Select the tasks that would be performed by an information systems graduate.
    9·1 answer
  • Question # 2 Multiple Select You wrote a program to compare the portion of drivers who were on the phone. Which statements are t
    6·1 answer
  • Which of these are the two main components of a CPU?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!