Which answer most closely explains what Margaret Hamilton meant by the statement, “It’s like preventative healthcare, but preventative software.”(2 points)

Responses

Preventative software can be used in the medical field to prevent surgical robotic errors. Surgical robotics is a growing field that cannot afford to have errors due to human lives being at stake.
Preventative software can be used in the medical field to prevent surgical robotic errors. Surgical robotics is a growing field that cannot afford to have errors due to human lives being at stake.

While a root canal can be performed by a dentist, there are also steps that could be taken to prevent its necessity. Similarly, there are steps that can be taken to prevent errors and issues due to poorly engineered software.
While a root canal can be performed by a dentist, there are also steps that could be taken to prevent its necessity. Similarly, there are steps that can be taken to prevent errors and issues due to poorly engineered software.

Before astronauts can travel to the moon, they need to go through extensive preventative healthcare measures to avoid getting sick while in space. Similarly, software should be used to prevent astronauts from getting sick in space.
Before astronauts can travel to the moon, they need to go through extensive preventative healthcare measures to avoid getting sick while in space. Similarly, software should be used to prevent astronauts from getting sick in space.
Question 2
Which of the following is the best explanation of a software function?(2 points)
Responses

A function that sorts items.
A function that sorts items.

A function that performs a mathematical operation.
A function that performs a mathematical operation.

A function that provides a set of instructions or tasks that a software program performs.
A function that provides a set of instructions or tasks that a software program performs.

A function that creates objects.
A function that creates objects.
Question 3
Car.Engine.CruiseControl.setCruiseSpeed(55) is an example of a function nested inside an object (CruiseControl), which is nested inside another object (Engine), and nested inside a final object (Car). This is an example of which paradigm?(2 points)
Responses

Event-driven programming
Event-driven programming

Procedural programming
Procedural programming

Object-oriented programming
Object-oriented programming

Automotive programming
Automotive programming
Question 4
Why is it critical for a developer to include well written documentation about what each function in the code does?(2 points)
Responses

So that others working on a different part of the overall project are able to write code that interacts with their work.
So that others working on a different part of the overall project are able to write code that interacts with their work.

So that other developers at other companies know what code is copyrighted.
So that other developers at other companies know what code is copyrighted.

So that my programming teacher will be happy.
So that my programming teacher will be happy.

So that someone who buys the software knows how to use it.
So that someone who buys the software knows how to use it.
Question 5
What is the difference between private and public functions?(2 points)
Responses

Private functions are only visible to the developer creating them, while public are listed publicly in a repository for the whole world to see.
Private functions are only visible to the developer creating them, while public are listed publicly in a repository for the whole world to see.

Private functions are only accessible to functions within the parent object, public functions can be accessed by other objects.
Private functions are only accessible to functions within the parent object, public functions can be accessed by other objects.

Public functions are only available to public sector companies, while private functions have strict copyright laws.
Public functions are only available to public sector companies, while private functions have strict copyright laws.

Private and public functions do not have any differences.

1 answer

Here are the best responses to the questions you presented:

  1. What did Margaret Hamilton mean by “It’s like preventative healthcare, but preventative software.”

    • Response: While a root canal can be performed by a dentist, there are also steps that could be taken to prevent its necessity. Similarly, there are steps that can be taken to prevent errors and issues due to poorly engineered software.
      • This response parallels preventative measures in healthcare with preventative measures in software development, which is what her statement implies.
  2. What is the best explanation of a software function?

    • Response: A function that provides a set of instructions or tasks that a software program performs.
      • This explanation captures the essence of what a function does in a software context.
  3. What paradigm is represented by Car.Engine.CruiseControl.setCruiseSpeed(55)?

    • Response: Object-oriented programming.
      • This describes the use of objects and methods, which is a hallmark of object-oriented programming.
  4. Why is it critical for a developer to include well-written documentation about what each function in the code does?

    • Response: So that others working on a different part of the overall project are able to write code that interacts with their work.
      • This highlights the importance of documentation for collaboration and maintaining code quality.
  5. What is the difference between private and public functions?

    • Response: Private functions are only accessible to functions within the parent object, public functions can be accessed by other objects.
      • This accurately defines the accessibility and scope of private versus public functions in programming.

Feel free to ask if you need further clarification or assistance!