logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

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!):

(5/5)
Attachments:

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. 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. The LineItem class will represent an individual

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

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

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

expert
Um e HaniScience

859 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

829 Answers

Hire Me
expert
Husnain SaeedComputer science

972 Answers

Hire Me
expert
Atharva PatilComputer science

958 Answers

Hire Me
August
January
February
March
April
May
June
July
August
September
October
November
December
2025
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
SunMonTueWedThuFriSat
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6
00:00
00:30
01:00
01:30
02:00
02:30
03:00
03:30
04:00
04:30
05:00
05:30
06:00
06:30
07:00
07:30
08:00
08:30
09:00
09:30
10:00
10:30
11:00
11:30
12:00
12:30
13:00
13:30
14:00
14:30
15:00
15:30
16:00
16:30
17:00
17:30
18:00
18:30
19:00
19:30
20:00
20:30
21:00
21:30
22:00
22:30
23:00
23:30