Questions: 11 448

Answers by our Experts: 10 707

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Describe the problem analysis-coding-execution cycle.
A) Write a program to confirm if a given number is a prime number or not.

B) Illustrate the above with a flowchart.

R=v2 sin2&/g

v = 30.0 (speed of the throwing), g = 9.8 (gravity), and $= angle in radians





User may insert an angle above or equal 45° and below 60° as the highest angle.

Then the program should calculate the horizontal range of the projectile motion (R) for each angle until the angle become 35°.

Consider the gravity (g) as a constant.

You are required to calculate the 𝜃 in radians by using the given formula (PI = 3.14286 which is a constant).

Use the necessary header files to do the calculation.


Write a C++ program to calculate the period of a conical pendulum (T) when a stone of mass 1 kg is whirled in a horizontal circle attached at the end of a 1.75 m long string and making an angle (in degrees) with the vertical is given by the user. The given below is the equation to calculate the period of a conical pendulum.

I cos 0

9

T

= 2n

1 = 1.75 m (length of the pendulum), g = 9.8 (acceleration due to gravity), and 8= half-angle of the conical

pendulum

• User may insert an angle above or equal to 30 and below 45" as the highest angle. • Then the program should calculate the period of a conical pendulum (1) for each angle until the angle

becomes 20".

. Consider gravity (g) as a constant. You are required to calculate the in radians by using the given formula (Pl = 3.14286 which is a constant).

Theta Ang/180.0 PI

• Use the necessary header files to do the calculation

Sample Output

Enter

35

34

33

32

Angle in Degrees: 35

2.40384 2.41832

2.43234

2.44591

Write a C++ program to calculate time dilation (t) in motion, when the speed of the moving objects (v) is given by the user. The given below is the equation to calculate the time dilation.




v = speed of the moving object, c = 15000 ms-1(speed of light), and t0 = 75 s (time in observers own frame of reference)

  • User may insert the speed of the moving objects (v) above or equal to 100 ms-1 and below 200 ms-1 as the highest speed.
  • Consider the speed of light (c) as a constant value.
  • Then the program should calculate the time dilation (t) for each speed of the moving object until the speed becomes 89 ms-1.
  • Use the necessary header files to do the calculation.

Write a C++ program to calculate the maximum height when the user gives the angle (in degrees). The given below is the equation to calculate the maximum height.




v = 10.568 (initial velocity), g = 9.8 (acceleration due to gravity), θ = angle of the initial velocity from horizontal plane in radians and H = maximum height

Note: Assign the above values for v, g and PI. Consider the g (acceleration due to gravity) is a constant.

  • User may insert an angle below 20° and above 10°.
  • Then the program should calculate the maximum height (H) for each angle only when the angle below 20°.
  • You are required to calculate the θ in radians by using the given formula (PI = 3.14286 which is a constant).  
  • Use the necessary header files to do the calculation

Create an Investment class that contains fields to hold the initial value of an investment, the current value, the profit (calculated as the difference between current value and initial value),and the percent profit (the profit divided by the initial value). Include a constructor that requires initial and current values and a display function. Create a House class that includes fields for street address and square feet, a constructor that requires values for both fields, and a display function. Create a HouseThatIsAnInvestment class that inherits from Investment and House. It includes a constructor and a display function that calls the display functions of the parents. Write a main()function that declares a HouseThatIsAnInvestment and displays its values.


Create a function to sort a unsorted singly linked list.
Note:
1)no global declarations are allowed
2) make class
with good examples explain how integer data types can be type- cast into real numeric data types and vice versa

Compile Time Polymorphism IV

Develop a program to overload binary operators.

The class Complex has the following public attributes

Data typeVariable nameintrealintimaginary

Include default constructor to initialize real and imaginary values to 0


Include the following functions in the Complex class and overload the binary operators

Member functionFunction descriptionvoid getvalue()This function is used to read .

void display()This function will display the result value

​​​​

 

Sample Input and Output :

[All texts in bold represents input and rest represents output statements]


Enter the value of Complex Numbers a,b :4 5

Enter the value of Complex Numbers a,b :7 8

Input Values :

Output Complex number : 4+5i

Output Complex number : 7+8i

Result :

Output Complex number : 11+13i

Output Complex number : -3-3i


LATEST TUTORIALS
APPROVED BY CLIENTS