Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(In C++ if possible) 8A. Create a class asteroid (or roid for short) and randomly place them in 3d space. Each has an id number,

(In C++ if possible)

8A. Create a class asteroid (or roid for short) and randomly place them in 3d space. Each has an id number, a mass, and an array of size three that contains the %mass for three important natural resources, these percentages MUST sum to less than 100, and usually are far less, the rest of the mass is considered waste. The average sum is 21% for all asteroids. You can consider each then to have a mean of 21/3 or 7% with a standard deviation of 4. No percentage can be negative. These asteroids lay in a ring of radius 50 from a center of rotation (our star). Their radius from the ring has a mean of 8 and a standard deviation of 5. They are uniformly distributed along the ring (0 to 2PI) AND from the ring. No two asteroids can exist in the same location as any other. Allow the user to enter N, the number of asteroids, generate all the values, display the data to the screen, then create a 3d gnuplot of this ring of asteroids.

(Anon who keeps spamming wrong/incomplete answers, please stop.)

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_2

Step: 3

blur-text-image_3

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions

Question

Recommend the key methods to improve service productivity.

Answered: 1 week ago