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

You are required to confirm the equation by a

simulation. In this simulation, you will consider how the ball moves

in very short time interval Δt.

I. You will assume that Δt is a constant double with a

value of 0.01. You can get the updated position using s = s + v * Δt. The velocity changes constantly—in

fact, it is reduced by the gravitational force of the earth. In a short time interval, Δv = –gΔt, you must

keep the velocity updated as v = v - g * Δt; In the next iteration, the new velocity is used to update the

distance.

You need to run the simulation until the cannon ball falls back to the ground. Your program should take

the initial velocity as an input. Update the position and velocity 100 times per second, but print out the

position only every full second. Also, printout the values from the exact formula s = vi t – (1/2) gt2

for the


comparison. Lastly plot the path that cannon ball will take to get the bonus marks.


Write a program that calculates the occupancy rate for a hotel. The program should start by asking the

user how many floors the hotel has. A for loop should then iterate once for each floor. In each iteration,

the loop should ask the user for the number of rooms on the floor and how many of them are occupied.

After all the iterations, the program should display how many rooms the hotel has, how many of them

are occupied, how many are unoccupied, and the percentage of rooms that are occupied. The

percentage may be calculated by dividing the number of rooms occupied by the number of rooms.

Input Validation: Do not accept a value less than 1 for the number of floors. Do not accept a number

less than 10 for the number of rooms on a floor.


Write a program to plot a graph of function f(x) = x

n + xn-1

. Your program should take a maximum

absolute value of x as well as a positive integer n as input. You will plot a graph for the range [0, x]. You

should label the y-axis according to the maximum value of x.


Implement a calculator using bitwise operators and for loops only. Your program should run correctly

for positive integers only. You calculator should be able to perform following operations.

Basic arithmetic functions (Addition, subtraction, division and multiplication); Square – to compute the

square of the given value and Power – to compute the power of an integer. It should take two int

arguments number and its power.


Using properties of a Maclaurin series

or Taylor series, you can approximate the function cos(x) using the following

formula:

cos(x) ≈ ∑ (−1)

n

x

2n

(2n)!

a

n=0


= 1 −

x

2

2!

+

x

4

4!

x

6

6!

+

x

8

8!

− . . . ..

x

2a

2a!


Write your own approximation of cos(x) without using any library methods (such as pow( ) etc.). Your

program should take x (in radians) and an as input. You should make two functions calcTerm( ) and

sumTerms( ) to calculate the value of cos(x). calcTerm( ) function will compute nth term in the sequence.

It should take x and term number as arguments and the return value of the term. sumTerms( ) takes a

single argument term value and should be used to calculate the sum of all terms. Finally, your program

will have a function testFunction( ), you will call it from main to verify whether your function is working

correctly or not.


Write a program that uses a structure Vector. This structure stores an array

V of double numbers, size of array n. This structure contains:

i. Function to input n, and all elements of V.

ii. Function to display n, and all elements of V.

iii. Function to reverse the order of elements of V.

iv. Function to return the element that appears most frequently in the

array.


The program declares a variable of Vector, and applies all functions on it.


Using dynamic array implement the following :

1. Create the list. The list is initialized to an empty state.



2. Determine whether the list is empty.



3. Determine whether the list is full.



4. Find the size of the list.



5. Destroy, or clear, the list.



6. Determine whether an item is the same as a given list element.



7. Insert an item in the list at the specified location.



8. Remove an item from the list at the specified location.



9. Replace an item at the specified location with another item.



10. Retrieve an item from the list at the specified location.



11. Search the list for a given item


Karim runs 10 spaza shops in different suburbs, each named Skuld Huiswinkel. He asks all the storekeepers to record the final day total sales so that he can determine which of his shops has more sales for each day. He has approached you to write a program that will store the name of the location for each shop and the total sales for the day.

3.1 The program should capture the Skuld Huiswinkel name and the corresponding total sales value amount for the day, all in one cin line.

3.2 The program should store the spaza name and the total sales value in two parallel arrays.

(8 Marks)

3.3 The program should keep a running total that will give the total sales from all spaza shops and also show the average sales for the day.

3.4 Before the program closes, it should store all the values of the parallel arrays in a text file named SHW_Sales.txt. Each line in the file must have the shop location name and the sales value, with these 2 items separated by a space



HBL Bank requires account management software. The branch manager met with the software engineers and discussed the details/requirements. According to him, the bank needs to store account title (name), account number, account type and balance for each account entry. You can deposit and withdraw amount. You are required to provide a library that can be utilized in the management system. Analyze the problem, and implement (interface and definitions) using C++ classes. Comment the header file (the interface) so that a manager can understand the functionalities of every public member function. Class should contain a display function to print all information of an account on screen. Create a demo main program to check each and every function. Also create setter/getter and a parameterized constructor with default arguments.


<<C++ HELP>>

trying to get the doe for the competition score with C++ coding, don't know if I have the while loop in the wrong place to read more athletes or one line of code is were another should be. the help will be greatly appreciated.


what is shown below is the input for the coding


Mirabella Jones's results:

7.50, 8.80, 7.00, 8.10, 8.00, 9.80, 9.30, 8.90, 9.10, 9.00

The highest score of 9.80 and the lowest score of 7.00 were

dropped

The average score is 8.59


Ruth Mendez's results:

9.80, 8.50, 6.00, 8.80, 8.60, 7.10, 7.80, 8.00, 7.20, 8.30

The highest score of 9.80 and the lowest score of 6.00 were dropped

The average score is 8.04




LATEST TUTORIALS
APPROVED BY CLIENTS