3.Im on a physics homework assignment and cant get passed question one, the assignment is a virtual lab the link
...
b the link is https://phet.colorado.edu/sims/html/projectile-motion/latest/projectile-motion_en.html
and these are the questions
2: Raise the cannon to a height of 15 meters. Set the horizontal velocity to 12 m/sa) Sketch the situationb) Predict the distance you have to place the target from the base of the cannon (calculate this & show all work).
c)Perform the experiment by placing the target at the predicted range and clicking the cannon button. Compare your predicted value to the outcome of the testing experiment. Do they agree or disagree? (Did you hit the target?)
3: Raise the cannon to a height of 5 meters. Measure the distance of the David statue from the base of the cannona) Sketch the situation.b) Predict the velocity with which you have to launch the object in order for it to hit the statue (calculate this & show all work).c)Perform the experiment by entering the predicted velocity and clicking Fire. Compare your predicted value to the outcome of the testing experiment. Do they agree or disagree? (Did you hit the statue?) If they disagree, look at your math again!
4: Set the initial velocity of the object to 20 m/s. Place the target at a range (distance) 20 m.a) Sketch the situation.d) Predict the height from which you have to launch the object in order for it to land on the target (calculate this & show all work).b) Perform the experiment by raising the cannon to the predicted height and clicking Fire! Compare your predicted value to the outcome of the testing experiment. Do they agree or disagree? (Did you hit the target?) If they disagree, look at your math again!
View More
5.- I was very sick for a while so I don't really know what I am doing * This homework
...
eation of several BST functions * We have to use Valgrind * We have to create a memory struct that provides a compare function for insertion * The above needs to contain two fields of unsigned int, representing memory address and size int memory_addr_cmp(const void* x, const void* y){ //TODO return 0; } By the instructions: "This function takes two arguments, const void* x and const void* y, you will need to cast both of them to type "memory*", and make comparisons. If x is less than y, return -1. If x is greater than y, return 1. If they are equal, return 0;" Also per the instructions, concerning the BST functions "Note, in particular, that there are two separate structus - the node struct that describes information for a single node in the tree, and a bst struct, that holds the root pointer and a function pointer to the comparison function being used for this tree. When you first create the tree, you pass in the comparison function, and this will be used for all functions that need it thereafter. Therefore, after that, you don't need to specify the comparison function to bst-level functions. The stored function pointer is then passed to the node-level functions." So then we have to create allocation and initialization functions for both the BST and one for the node. * nod_insert, BST_insert then inorder_traversal
View More
7.Learning Objectives
Design and write pseudocode using a repetition structure
Design and write Java for a class, including attributes, accessors, mutators, and
...
va for a class, including attributes, accessors, mutators, and constructors.
Design and write Java for an application program that instantiates and uses objects of a user-defined class.
Use the repetition structure in class methods and application program modules.
Perform error checking.
Use a graphical drawing program (ArgoUML) to create class diagrams.
Directions for completing and submitting the homework:
You will be submitting the following files:
Task #1:
Pseudocode written with Word, Notepad++, or similar application
Task #2:
Pennies.java
Task #3
Inventory.java
The application class created in 3b below
The UML class diagram created in ArgoUML, Raptor, or similar application
Homework Assignment:
Write the pseudocode needed to complete Chapter 5, number 9 – Pennies for Pay.
Implement Pennies for Pay in Java.
The Secondhand Rose Resale Shop is having a seven-day sale during which the price of any unsold item drops 10 percent each day. Design a class diagram showing the class, the application program, the relationship between the two, and multiplicity. Then write the Java code as described below. Be sure to follow the CSI 117 Style Criteria (Links to an external site.) for naming conventions, class diagrams, pseudocode, keywords, and operators.
An Inventory class that contains:
an item number and the original price of the item. Include the following:
A default constructor that initializes each attribute to some reasonable default value for a non-existent inventory item.
Another constructor method that has a parameter for each data member, called the overloaded constructor. This constructor initializes each attribute to the value provided when an object of this type is instantiated. Be sure to incorporate adequate error checking for all numeric attributes.
Accessor and mutator methods for each attribute. Be sure to incorporate adequate error checking for all numeric attributes.
Extra credit for including Javadoc comments.
An application program that contains two methods: the main() module and the printSaleData()module.
The main()module must do the following:
create an Inventory object using the default constructor
use a loop to get inventory items from the user. The user should enter the item number and the original price of the item. This loop should continue until the user indicates that they have no more items to enter. For each item entered by the user, the code inside the loop should do the following 2 items:
set the attributes of the Inventory object by calling the appropriate method in the Inventory class for each item entered by the user
send the Inventory items, one at a time, to the printSaleData() module for processing
Extra credit for including Javadoc comments.
The printSaleData()module must accept an Inventory object and produce a report that shows the item number and the price of an inventory item on each day of the sale, one through seven, using a loop. For example, an item with an original price of $10.00 costs 10 percent less, or $9.00, on the first day of the sale. On the second day of the sale, the same item is 10 percent less than $9.00, or $8.10.
View More