Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

problem 1: Another pizza problem. Carnivorous Carla only eats pizza if it has at least three of the following ingredients: ham, pepperoni, salami, italian sausage, bacon. You have the function contains() to check whether a certain ingredient is on the pizza. prepare a brief list of instructions (pseudocode) to find out whether Carla will eat the pizza.

problem 2: prepare out a detailed plan for a program to find out the largest value in an array that is smaller than a ceiling C. For illustration, assume that the array has the values {4, 14, 11, 100, 6} and C = 12. The program must report 11 as the answer.

problem 3: prepare out a detailed plan for a program to reverse the order of an array. For illustration, if the array contains the elements {0, 99, 7, 4}, then after reversal it will contain {4, 7, 99, 0}.

problem 4: You previously wrote a program to draw a cow. Now, draw a cow standing amongst the grass, with (say) 500 blades of grass. Each blade of grass must be a separate random green line. Do all your drawing in the draw() loop. (Do not turn off the loop, either.)

problem 5: prepare a program to check whether a car will crash. There is an obstacle at a certain distance (say 100 m) and the car is travelling at a certain speed (try it with some various speeds). The user hits the brakes after 0.5 seconds, applying a deceleration of 5 m/s^2. Draw the progress of the car and report whether it stopped safely or hit the obstacle.

problem 6: prepare a program to display some data in bar graph form. Have at least 20 elements, that can be positive or negative; draw each element with a vertical bar, going up if the data is positive or down if the data is negative. Once you have displayed the bar graph, allow a user to choose a given element by cycling via the data with keys (e.g., 'a' to move left, 's' to move right) and print the exact value of the selected bar. Show the present selection by highlighting its bar somehow (ex: drawing a thick outline around it).

problem 7: prepare a program to display ten buttons with five possible colors: red, orange, yellow, green, blue. When the user clicks on a button, its color should advance to the next color, or go back to red if it was blue. Your buttons can be rectangles or ellipses (circles), depending on what you find simpler.

problem 8: prepare a program to display 20 ellipses which move away from the mouse pointer. Their initial locations must be random.

problem 9: Modify your solution to #8 so that if an ellipse is touched by the mouse, it turns permanently green. Bonus: a green ellipse stops moving, however recovers after 5 seconds, returning to its old color and regaining its ability to move.

problem 10: Implement a "lunar lander" simulation. The lander will fall according to gravity, but by firing the rockets (press spacebar) you can slow its fall (accelerate upwards). If the lander touches the ground with less than a certain speed, it landed safely, otherwise it crashed.

Allow rockets to fire side to side also, and have a "safe landing" zone, where landing outside the safe zone counts as a crash.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91235

Have any Question?


Related Questions in Computer Engineering

Wildhorse inc has outstanding bonds that will mature in six

Wildhorse, Inc., has outstanding bonds that will mature in six years and pay an 8 percent coupon semiannually. If you paid $1,009.52 today and your required rate of return was 7.0 percent.  (Round intermediate calculatio ...

Assume you have been selected to build a system for

Assume you have been selected to build a system for Oil&Gas company. Do you prefer to build a win-based system or a web-based system? Why?

Subject oop javaassume you want to develop an application

Subject: OOP, Java Assume you want to develop an application like Microsoft Word, Microsoft Excel, Microsoft Paint, etc. in which multiple users are allowed to access the same file simultaneously from different locations ...

Small business e-commerce portals check out small business

Small Business e-Commerce Portals Check out Small Business Center and the other e-commerce portals mentioned. Then answer the questions. Note: Small Business Center and Entrabase.com are interesting sites that offer a wi ...

Question why we still study computer graphics whats the

Question : Why we still study computer graphics ? Whats the benefits of this science ? can you give a practical examples that employs computer graphics ? What is the best book to learn computer graphics in details and cl ...

Suppose that the government is coming up with an employment

Suppose that the government is coming up with an employment protection policy that requires firms to pay each laid-off worker two more months of salary after they are laid off. This essentially changes the variable adjus ...

Remember all of the following steps when showing that a

Remember all of the following steps when showing that a problem D is NPcomplete: 1. Show that D is in NP by briefly explaining how to quickly verify a solution to it. 2. Choose another problem Q that is known to be NP-ha ...

Rocket motors are tested by restraining them on the ground

Rocket motors are tested by restraining them on the ground, firing them with a known amount of propellant, and measuring the thrust over time. A typical curve is shown below. The total impulse is the integral of the thru ...

Give examples of how dominos has adapted its global

Give examples of how Domino's has adapted its global marketing mix to meet the needs of local consumers. Are you their customer? If so, why?

Suppose the information content of a packet is the ascii

Suppose the information content of a packet is the ASCII (8-bit code) representation of "OK" and an even parity scheme is being used. What would the value of the field containing the parity bits be for the case of a two- ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As