logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Aadil Ahmad ParrayMathematics
(/5)

981 Answers

Hire Me
expert
Elijah YoungManagement
(5/5)

567 Answers

Hire Me
expert
Tessa DuckworthMarketing
(5/5)

651 Answers

Hire Me
expert
Edwin KairuStatistics
(/5)

982 Answers

Hire Me
C++ Programming

Define the basic functional components of a computer system, operation and inter-connection

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Assignment 1

Learning Outcome:

  1. Define the basic functional components of a computer system, operation and inter-connection (3%)

  2. Apply programming concepts to computing problems (7%) Weight: 10%

 

Part 1: Programming – Tin Can Mail

Problem Statement

This assignment is inspired by the mail delivery system of Niuafo’ou, the northern most island of the Kingdom of Tonga. Niuafo’ou is actually a volcano, which descends steeply into the sea and has a crater lake in its middle. Due to its steep slopes into the sea, it has no proper port or harbour, and even landing by boat on one of the few stony beaches can be dangerous.

In the 1880s, the Tin Can Mail mail delivery system was developed: Incoming mail was put into a tin can and thrown overboard close to the island from a mail boat, and outgoing mail in a tin can was shot out to sea by means of a cannon to be picked up by the mail boat.

Tin Can Mail became famous beyond Tonga, with special stamps that have become collector items all over the world. This system lasted for a hundred years until 1983, when an airfield was built, and mail could be delivered by plane.

In this assignment you are asked to determine the trajectory of the outgoing tin cans, given launch speed (muzzle speed of the cannon), launch angle and wind speed by means of Euler’s integration formula as shown in Figure 1. Your program is to simulate the trajectory and estimate the landing position of the tin can. It must take into account the air resistance and wind, since there will be usually a sea breeze blowing towards the coast. The simulation is based on classical equations for projectiles and air resistance.

  • Equations

The position of the tin can over time is modelled by the functions π‘₯(𝑑) and 𝑦(𝑑), and the speed of the tin can over time is modelled by the functions 𝑣s(𝑑) and 𝑣y(𝑑), where x is the horizontal direction and y is the vertical direction, as shown in Figure 1. The drag forces 𝐹s(𝑑) and 𝐹y(𝑑) slow the projectile down in x and y direction, respectively. For low speeds, this force can be approximated as growing linearly with the relative speed of the projectile with respect to the breeze. Assuming a sea breeze with constant (negative) wind speed 𝑣ws, the drag forces are:

 

𝐹s(𝑑) = −𝑐d(𝑣s(𝑑) − 𝑣ws) and

𝐹y(𝑑) = −𝑐d𝑣y(𝑑) − 𝑔

where 𝑐d is the drag coefficient and 𝑔 is the acceleration due to gravity.

Our approximation uses Euler’s integration method, which assumes that from the launch at time t=0, the projectile’s movement is simulated in many very small time steps where during each time step the projectile moves a very small distance and its speed is diminished by a very small amount as well.

During one time interval βˆ†π‘‘, the tin’s position changes as

π‘₯(𝑑 + βˆ†π‘‘) = π‘₯(𝑑) + 𝑣s(𝑑)βˆ†π‘‘

𝑦(𝑑 + βˆ†π‘‘) = 𝑦(𝑑) + 𝑣y(𝑑)βˆ†π‘‘

and during the same time interval, the speed of the tin is slowed down by the drag as

𝑣s(𝑑 + βˆ†π‘‘) = 𝑣s(𝑑) + 𝐹s(𝑑)βˆ†π‘‘

𝑣y(𝑑 + βˆ†π‘‘) = 𝑣y(𝑑) + 𝐹y(𝑑)βˆ†π‘‘

Initially we have π‘₯(0) = 𝑦(0) = 0, 𝑣s(0) = 𝑐 cos 𝛼, and 𝑣y(0) = 𝑐 sin 𝛼

where 𝑐 is the launch speed and 𝛼 the launch angle.

  • Wind Speed

For the wind speed, the program should use the Beaufort Scale. It asks the user to enter a Beaufort number as defined in Table 1. If the number entered is between 0 and 6, the program uses the wind speed from the Table. If the number entered is 7 or above, the program is to inform the user that it is no longer safe to launch a tin can, due to the strong wind.

  • Approximating the Trajectory

In your C++ program, implement the equations above with suitably named variables and constants of the correct types. Implement the iteration of the many time intervals as an appropriate loop that terminates when the projectile hits the water (𝑦(𝑑) = 0). Make sure that it does terminate!

Use the values in Table 2 for those variables (Note that our initial speed is named c and our speed of sea breeze is named 𝑣ws and must be negative!):

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. ThisΒ  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme