CS代考 To complete the same program in multiple languages, so that by the end of t

To complete the same program in multiple languages, so that by the end of the course you are able

1. Determine what aspects of this problem are easier to solve in which languages, and why

Copyright By PowCoder代写 加微信 powcoder

that is so.

2. Determine what aspects of this problem are harder to solve in which languages, and why
that is so.

3. Make comparison statements about different languages.
4. Explain how data organization differs or is similar between languages.
5. Explain how execution differs or is similar between languages, including being able to

explain how non-sequential and non-procedural execution may be achieved.

6. See how using a different language makes your programming in another language better.
7. Identify how computing science is independent of programming language.

Instructions:
Construct a simple, imaginary world with a princess and dragons, where the user controls the

princess, to attempt an escape. There is a square land (number of rows is equal to number of

columns), an island, with a river around the outside. The land looks something like this (for size

Programming Languages

Common Assignment
Introduction to Each Focus Language

Set up your world after prompting the user for the grid size, which must be between 4 and 10

inclusive, or the user must try it again. Place the princess in the middle of the board

(if the size is even, then bottom, right of the middle squares). Place dragons at a

random probability of 25% into the remaining (currently empty) squares. To do this,

generate random numbers and for 25% of your range add a dragon, while for 75% of your range

do not add a dragon.

Your program must enable a user to enter commands to move the princess. If the princess reaches

an edge of the island, she will dive into the water and swim to safety on the mainland – this is the

user’s goal: to get the princess to safety.

Fortunately, the dragons are all scared of the water, have no intelligence, and are very near-

sighted. They refuse to leave the island or move around.

The princess is controlled by the user and may move left, right, up, or down (but not

diagonal). Prompt the user for the move, and accept any answer that starts with the first

letter of the direction as valid (either upper or lower case). For example, if the user enters

“Don”, “d”, “dawn” or “dzzzzzzz”, assume that means “down”. If the user moves the

princess off the edge, print a message congratulating the user on freeing the princess and show the

final board.

If the princess moves onto a dragon, then the princess is, of course, eaten. Provide a message,

indicate where the princess was eaten (by printing “yum yum” on the game board), and end the

Document all of your code. Remember to include file and method headers and to use descriptive

variable names and proper indentation.

Make your program as nice for the user as possible, within the given programming language and

within standard output.

Sample Expected Output:

Welcome to Princess vs Dragons

Enter Size of Game: 6

—— —— —— —— —— ——

—— —— —— —— —— ——

dragon dragon —— —— —— ——

dragon —— —— princess dragon ——

dragon dragon —— —— —— dragon

dragon —— dragon —— —— ——

Enter Movement: up we go !!! ha ha

—— —— —— —— —— ——

—— —— —— —— —— ——

dragon dragon —— princess —— ——

dragon —— —— —— dragon ——

dragon dragon —— —— —— dragon

dragon —— dragon —— —— ——

Enter Movement: right

—— —— —— —— —— ——

—— —— —— —— —— ——

dragon dragon —— —— princess ——

dragon —— —— —— dragon ——

dragon dragon —— —— —— dragon

dragon —— dragon —— —— ——

Enter Movement: d

—— —— —— —— —— ——

—— —— —— —— —— ——

dragon dragon —— —— —— ——

dragon —— —— —— yum yum ——

dragon dragon —— —— —— dragon

dragon —— dragon —— —— ——

Sorry, the princess has been eaten!

Welcome to Princess vs Dragons

Enter Size of Game: 5

—— —— —— —— ——

dragon dragon dragon —— ——

—— dragon princess —— ——

—— —— —— —— dragon

—— dragon —— —— ——

Enter Movement: down

—— —— —— —— ——

dragon dragon dragon —— ——

—— dragon —— —— ——

—— —— princess —— dragon

—— dragon —— —— ——

Enter Movement: L

—— —— —— —— ——

dragon dragon dragon —— ——

—— dragon —— —— ——

—— princess —— —— dragon

—— dragon —— —— ——

Enter Movement: l

—— —— —— —— ——

dragon dragon dragon —— ——

—— dragon —— —— ——

princess —— —— —— dragon

—— dragon —— —— ——

Enter Movement: r

—— —— —— —— ——

dragon dragon dragon —— ——

—— dragon —— —— ——

—— princess —— —— dragon

—— dragon —— —— ——

Enter Movement: y

Not sure of your selection. Try again

Enter Movement: left

—— —— —— —— ——

dragon dragon dragon —— ——

—— dragon —— —— ——

princess —— —— —— dragon

—— dragon —— —— ——

Enter Movement: lynzasdfjkj;kjdfaj fjkjdafj dkjf

—— —— —— —— ——

dragon dragon dragon —— ——

—— dragon —— —— ——

—— —— —— —— dragon

—— dragon —— —— ——

The princess has escaped

Marking for the Program:
Due to the large number of students in our Computing Science program, it is no longer possible

for the instructor to run each program individually. This means that your code (+ testing) must

speak for itself, and convince the instructor that your program works. You must hand in testing of

your program. The instructor will run some programs each time. These will be chosen at random

or if it seems the code does not match the testing submitted. If the code does not match the testing

that is submitted, then a mark of 0 (zero) will be awarded for the assignment.

Considerations when marking:

1. Correctness 65%
Program must be in the proper programming language, complete, working, with no

plagiarism, and with testing submitted

2. Documentation 25%
Your code is easy to read and follow. contains proper indentation, file header(s) [name,

date, summary], program subdivision [modularity], subprogram headers [summary,

parameter, return], descriptive variable names including method names, no useless code,

good scoping of variables, inline useful comments [no code translation], main steps that

are clear [pop out], and loop/conditional/recursion levels that are reasonable, and is well-

3. Style 10%
This includes design, efficiency, and appropriate/idiomatic use of the programming

A program that does not compile/run will attain a mark of 50% at best, depending on

documentation, style, and how much of the program appears finished. Please make sure your

program compiles/runs, even if incomplete.

Hand in on eClass (no compressed [e.g. zip] files please):
1. Pdf of testing runs. Show all aspects of your program.
2. Program files of code to run.
3. Pdf of your program code (put all the code into one pdf). This is used to provide feedback.

If you do not submit a pdf, then you will not receive feedback.

Credits for Dragon and Princess Images:
https://thegraphicsfairy.com/amazing-vintage-dragon-image-rare/, retrieved 1:39 pm June 6, 2022

https://www.cool2bkids.com/dragon-coloring-pages/, retrieved 1:52 pm, June 6, 2022

https://artprojectsforkids.org/how-to-draw-a-princess/, retrieved 2:33 pm, June 6, 2022

https://www.freepik.com/free-vector/sticker-set-with-different-types-dinosaurs-cartoon-

characters_16854010.htm#query=cartoon%20dragon&position=21&from_view=keyword, retrieved 3:46 pm, June 6,

Q: What is the favorite sport of Canadian dragons?

A: Water polo (it’s really ice hockey, but this is what you get when they try to play hockey)

https://thegraphicsfairy.com/amazing-vintage-dragon-image-rare/

Dragon Coloring Pages

Easy How to Draw a Princess Tutorial


https://www.freepik.com/free-vector/sticker-set-with-different-types-dinosaurs-cartoon-characters_16854010.htm#query=cartoon%20dragon&position=21&from_view=keyword
https://www.freepik.com/free-vector/sticker-set-with-different-types-dinosaurs-cartoon-characters_16854010.htm#query=cartoon%20dragon&position=21&from_view=keyword

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com