Problem solving task

The airplane

You are navigating an airplane, which can take a series of commands:

• up X increases the direction by X units

• down X decreases the direction by X units

• forward X increases the horizontal position by X units and the vertical

position by X multipled by the current direction

Here is an example of a preplanned course:

forward 4

up 2

forward 8

down 1

forward 2

up 3

forward 3

These instructions would do the following (with the initial position and direction

set to 0):

• Increase the horizontal position by 4 (as your direction is 0, the vertical

position stays unchanged)

• Increase the direction by 2

• Increase the horizontal position by 8 and vertical position by 16 (as the

direction is 2, the vertical position becomes the previous value 0 + 2 * 8

= 16)

• Decrease the direction by 1

• Increase the horizontal position by 2 and vertical position by 2 (as the

direction is 1, the vertical position becomes the previous value 16 + 1 * 2

= 18)

• Increase the direction by 3

• Increase the horizontal position by 3 and vertical position by 12

This course would result in a horizontal position of 17 and a vertical position of


Create a program that reads the preplanned course from a file (e.g. a file

containing the preplanned course above), calculates the horizontal and vertical

position after following the course and then multiplies the final horizontal position

by the final vertical position. In this case that would be 17 * 30 = 510.

Sumbit the code for calculating the above scenario.

It should be

• Easy to extend the code with additional commands, could for example

be a dive command where “dive 4” would instantly decrease the vertical

position by 4

• Unit tests

• Readable code that is easy to follow

Taidot: C# -ohjelmointi, .NET, Visual Studio

Tietoa asiakkaasta:
( 0 arvostelua ) Uppsala, Sweden

Projektin tunnus: #33774154

10 freelanceria on tarjonnut keskimäärin $98 tähän työhön

(2 arvostelua)

Hi, I will write the program for you in C#. I am.a .net expert with mamy projects in my profile. You may check my work experience in the profile. Regards, Eagle Eyes

$55 USD 7 päivässä
(21 arvostelua)

Hi, We have a team of enthusiastic and hard working developers. Having experience of varying from ~ 13 years to ~5 years in providing solutions for API integration, Website development, App development along with Add Lisää

$600 USD 20 päivässä
(15 arvostelua)

Hello, I have briefly read the description on; .NET C# Programming Visual Studio project, and I can deliver as per the requirements however I need us to discuss for more clarity on the details, deadline and budget as Lisää

$20 USD 7 päivässä
(2 arvostelua)

Hello, I have rich experience in C# coding. I have read all your explanations carefully and fully understand your requirements. So I am sure I can give you correct and good results. I would appreciate it if you could c Lisää

$50 USD 1 päivässä
(2 arvostelua)

.NET EXPERTT HERE *HAVE A LOOK AT REVIEWS* Hey there. I hope you are having a good day. I have seen your requirement and I can work with you for a long time on a shopifyin a given deadline. if you have any other requi Lisää

$140 USD 7 päivässä
(2 arvostelua)

Hi there, I’m a computer science expert and software architect with hands-on experience In JAVASCRIPT, HTML, C++, PYTHON, JAVA, and PHP. I would like to help you with this project. Inbox me to discuss this further. T Lisää

$20 USD 7 päivässä
(0 arvostelua)

Professional software developer️ Hello, I have confirmed your project requirements I hope you are safe and doing well. I would like to discuss further with you. We hope to see you soon to discuss further. Coming to me, Lisää

$20 USD 1 päivässä
(0 arvostelua)

This project looks like 'mars rover problem'. In these projects, the important thing is not just correct result, the architecture and design patterns are important subjects. I can implement solution with command design Lisää

$20 USD 2 päivässä
(0 arvostelua)

Hello there, I'm a Computer Engineering student and I have experience in problem solving and C#. I will provide an easy-to-understand C# code that reads the preplanned course from a file and does it's intended task. I Lisää

$20 USD 1 päivässä
(0 arvostelua)