Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Requirements: - The assignment is based on topics covered from Week-1 to 4. - You need to carefully follow the input format and generate sensible

image text in transcribed

Requirements: - The assignment is based on topics covered from Week-1 to 4. - You need to carefully follow the input format and generate sensible output. If the program crashes during testing, you may lose the corresponding marks in specific tests. - This assignment should be submitted on 25/12/20224pm through Turnitin. Any submission after the due date will be dealt with late submission penalties. Task 1 (10 marks) Write a program to calculate the Distance travelled. For example, if a train travels 40 kilometres per hour for three hours, the distance travelled is 120 kilometres. Write a program that asks the user for the speed of a vehicle (in kilometres per hour) and the number of hours it has travelled. It should then use a loop to display the distance the vehicle has travelled for each hour of that time period. (The distance a vehicle travels can be calculated as follows: distance = speed * time) Sample output: What is the speed of the vehicle in (in kilometres per hour)? 40 How many hours has it travelled? 3 Write an algorithm in structured English (pseudocode) that describes the steps required to perform the task specified. Some examples of pseudocode can be found at http://www.unf.edu/ broggio/cop2221/2221pseu.htm . Select 3 sets of test data that will demonstrate the 'normal' operation of your program: that is test data that will demonstrate what happens when VALID input is entered. Select another 2 sets of test data that will demonstrate the "abnormal" operation of your program. Set it out in a tabular form: the test data, the reason it was selected, the output expected as a result of using that test data, and finally leave space to record the output actually observed when the test data is used. Sample test data table should be like the below

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 15th International Conference Dasfaa 2010 Tsukuba Japan April 2010 Proceedings Part 1 Lncs 5981

Authors: Hiroyuki Kitagawa ,Yoshiharu Ishikawa ,Wenjie Li ,Chiemi Watanabe

2010th Edition

3642120253, 978-3642120251

More Books

Students also viewed these Databases questions