nerdexam
Cisco

200-901 · Question #341

What are two benefits of using classes over functions when writing applications? (Choose two.)

The correct answer is A. improved readability C. variable reusability. Improved readability: Classes allow for encapsulation of related functionality and data, promoting clearer and more readable code. They help organize code in a modular and structured way, making it easier for developers to understand and maintain. Variable reusability: Classes…

Software Development and Design

Question

What are two benefits of using classes over functions when writing applications? (Choose two.)

Options

  • Aimproved readability
  • Bincreased compatibility
  • Cvariable reusability
  • Dincreased performance
  • Ecode organization

How the community answered

(32 responses)
  • A
    88% (28)
  • B
    6% (2)
  • D
    3% (1)
  • E
    3% (1)

Explanation

Improved readability: Classes allow for encapsulation of related functionality and data, promoting clearer and more readable code. They help organize code in a modular and structured way, making it easier for developers to understand and maintain. Variable reusability: Classes support the concept of encapsulation, allowing for the encapsulation of variables and functions into a single unit. This promotes reusability, as objects created from classes can be reused in different parts of the application or in different applications altogether.

Topics

#Object-Oriented Programming#Classes#Software Design Principles#Code Organization

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice