Write a program to calculate the trajectory of a cannon ball

Assignment Help Basic Computer Science
Reference no: EM13853450

Write a program to calculate the trajectory of a cannon ball (we use a watermelon). The program must ask the user for the initial velocity and initial trajectory angle then ask the user what they want to calculate, Time of flight or Max. height or horizontal range. Calculate what user wants and display it.

Formulas:

User input:

The initial velocity valid rage is 10 to 1000 m/s

The initial angle valid range is 1 to 89 degrees

Requirement

Must implement functions for each of the followings:

1. Calculating peak height. Must not print the result in the function

2. Calculating max range. Must not print the result in the function

3. Calculating travel time. Must not print the result in the function

4. Check for valid input from the user and give the user chance to reenter the data 3 times, after 3 incorrect tries give user a notice and exit the program. You can do some print statements in this function depending on how you design your code

Reference no: EM13853450

Questions Cloud

The initial hypothesis supported or refuted? explain. : Was the initial hypothesis supported or refuted? Explain.
Write about online gaming prototypes : Write about online gaming prototypes that can be used and types of online ventures that may be profitable and how it will help and grow Wire's online business ventures. The paper need to be written in a fashion in which it addresses the company v..
Rental rate of capital and marginal productivity of labor : According to The Wall Street Journal, Mitsubishi Motors recently announced a major restructuring plan in an attempt to reverse declining global sales. Suppose that as part of the restructuring plan Mitsubishi conducts an analysis of how labor and cap..
Draw the isoquants for this production function : The production function at Ginko's Copy Shop is q = 1000 x min(L, 3K), where q is the number of copies per hour, L is the number of workers, and K is the number of copy machines. As an example, if L = 4 and K = 1, then the minimum of L and 3K, min(L,..
Write a program to calculate the trajectory of a cannon ball : Write a program to calculate the trajectory of a cannon ball (we use a watermelon). The program must ask the user for the initial velocity and initial trajectory angle then ask the user what they want to calculate
Trusted computer system evaluation criteria : How well did the Common Criteria (CC) address these four problems of TCSEC - relevance and correctness of content, clarity and logical flow, spelling, grammar, and proper citations/bibliography.
Using an annualized equivalent cost analysis : Machine A costs $20,000, lasts 3 years and has a salvage value S of $3,000. Machine B costs $12,000, lasts 2 years and has a salvage value of $2,000. The machines can be purchased at the same price with the same salvage value in the future, and are n..
How much the workers in risker job should should get paid : Farm workers in Oaks Farmville face a 1/198 probability of death at work and each of them receives a yearly wage of $61,000. Farm workers in Valley Farm face a 1/54 of death at work. Assume that both kinds of job require the same level of skills, eff..
Which immunological process is impaired in jeremiah? : Which immunological process is impaired in Jeremiah? Which is the gene/s that could be implicated in this deficiency?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Find pythagorean triplets

Given an array of integers, find Pythagorean triplets. i.e. find a,b and c which satisfies a^2 + b^2 = c^2 Integers could be positive or negative.

  Linux-support skills

After completing the activities, take a screenshot of the following and copy onto this report. Linux+ Support skills: Editing Files in Linux

  Many different concepts associated with oop

1. (1) There are many different concepts associated with OOP (Object-oriented programming) like:· Class· Object· Inheritance· Polymorphism

  Convert the decimal integer

Convert the decimal integer -24 to 16 bit and 32 bit two's complement hexadecimal representation. show your calculations.

  Define what is displayed on a computer screen

Computer users may encounter situations in which they can best express a computer-related problem or solution by showing the audience a graphic or video representation of what is displayed on a computer screen.

  Project in designated area of coastal zone is significant

Have you contacted State Historic Preservation Office (SHPO) to see if the project is in designated area of coastal zone which is significant to the study, understanding, or illustration of national, state.

  Briefly explain the main concept of a java virtual machine

Briefly explain the main concept of a Java Virtual Machine (JVM.)

  What are some differences from the new version that make

You have now become familiar with using the VMware ESXI and vCenter applications. You have also just completed an upgrade to vSphere 5, so while much of the tools and interfaces look similar, nuances and procedures have changed somewhat. When deployi..

  Difference between it and information systems

Discuss the advantages and disadvantages of spreadsheet software as number-crunching software.

  Write recursive function that displays an arbitrary element

Your function should take a single integer argument that corresponds to the index of the element in the recursive sequence. The function should return the value of that particular element.

  Evaluate the following boolean expression

Assume that a=5, b=2, and c= 3. What problems do you encounter when attempting to evaluate the following Boolean expression?

  What would the data dictionary

what would the data dictionary look like for question 5a pg. 88

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd