Introduction to Computer Science Lab

computer science

Description

Introduction to Computer Science Lab


Midterm

10/17/2016


1. Build a world containing a person who can calculate Einstein’s formula e =

m* C 2 in his or her head, where the user enters the m value (mass, in

kilograms), and c is the speed of light (299,792,458 meters per second).

Define descriptive variable for each quantity, and define a function to

calculate the formula. Use the world function pow() to computer C 2 . (50

points)


2. Choose a hopping animal from Alice Gallery (for example, a frog, a bunny,

etc.). Write a hop() method that makes it hop in a realistic fashion, with a

parameter that lets the sender of the message specify how far the animal

should hop. Using your hop() method, have your animal hop around a

building in four hops. (50 points)


Present your Alice code to the instructor, and submit them to Ecourse.


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.