subject

The following code simulates the movement of a golf ball in the air after it's been hit. initialVelocity ← 44
accelFromGravity ← -9.8
x ← 0
y ← 0
t ← 0
REPEAT UNTIL (y < 0) {
x ← initialVelocity * t;
y ← (initialVelocity * t) + ((accelFromGravity * (t*t)) / 2)
DISPLAY(x)
DISPLAY(y)
t ← t + 1
}

Which statement best describes why this simulation is an abstraction?

(Choice A)
It leaves out details that do not effect the results as much, such as air resistance or golf ball material.

(Choice B)
It uses short variable names that can be interpreted ambiguously.

(Choice C)
It displays the results in text instead of using a visual output.

(Choice D)
It uses a loop to repeat the same block of commands multiple times with differing values.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 18:00
File account.java (see previous exercise) contains a definition for a simple bank account class with methods to withdraw, deposit, get the balance and account number, and return a string representation. note that the constructor for this class creates a random account number. save this class to your directory and study it to see how it works. then write the following additional code: 1. suppose the bank wants to keep track of how many accounts exist. a. declare a private static integer variable numaccounts to hold this value. like all instance and static variables, it will be initialized (to 0, since itÒ€ℒs an int) automatically. b. add code to the constructor to increment this variable every time an account is created. c. add a static method getnumaccounts that returns the total number of accounts. think about why this method should be static - its information is not related to any particular account. d. file testaccounts1.java contains a simple program that creates the specified number of bank accounts then uses the getnumaccounts method to find how many accounts were created. save it to your directory, then use it to test your modified account class.
Answers: 3
question
Computers and Technology, 23.06.2019 23:30
What can you prevent issues related to downloading content form the internet
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
How do i change the size of my bookmarks in my bookmarks bar in google chrome? ? plz hlp me
Answers: 2
question
Computers and Technology, 24.06.2019 17:40
File i/o activity objective: the objective of this activity is to practice working with text files in c#. for this activity, you may do all code in the main class. instructions: create an app that will read integers from an input file name numbers.txt that will consist of one integer per record. example: 4 8 25 101 determine which numbers are even and which are odd. write the even numbers to a file named even.txt and the odd numbers to a file named odd.txt.
Answers: 3
You know the right answer?
The following code simulates the movement of a golf ball in the air after it's been hit. initialVel...
Questions
question
Mathematics, 20.11.2021 07:50
question
Mathematics, 20.11.2021 07:50