Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
5th Edition
ISBN: 9780134801155
Author: Tony Gaddis
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 11, Problem 4PE

Astronomy Helper

Create an application that displays the following menu:

Select a Planet

  1. 1. Mercury
  2. 2. Venus
  3. 3. Earth
  4. 4. Mars
  5. 5. Exit the program

Enter your selection.

When the user selects a planet from the menu, the program should display data about the planet's average distance from the sun, the planet’s mass, and the planet’s surface temperature. Use the following data in your program:

Mercury  
Average distance from the sun 57.9 million kilometers
Mass 3.31 × 10^23kg
Surface temperature –173 to 430 degrees Celsius
Venus  
Average distance from the sun 108.2 million kilometers
Mass 4.87 × 10^24kg
Surface temperature 472 degrees Celsius
Earth  
Average distance from the sun 149.6 million kilometers
Mass 5.967 × 10^24kg
Surface temperature –50 to 50 degrees Celsius
Mars  
Average distance from the sun 227.9 million kilometers
Mass 0.6424 × 10^24kg
Surface temperature –140 to 20 degrees Celsius
Blurred answer
Students have asked these similar questions
Distance Traveled Assuming there are no accidents or delays, the distance that a car travels down an interstate highway can be calculated with the following formula: Distance = Speed × Time Create an application that allows the user to enter a car’s speed in miles per hour. The application should have buttons that display the following: • The distance the car will travel in 5 hours • The distance the car will travel in 8 hours • The distance the car will travel in 12 hours
Assuming there are no accidents or delays, the distance that a car travels down an interstate highway can be calculated with the following formula:                                   Distance = Speed × TimeCreate an application that allows the user to enter a car’s speed in miles per hour.The application should have buttons that display the following:• The distance the car will travel in 5 hours• The distance the car will travel in 8 hours• The distance the car will travel in 12 hours
Falling Distance When an object is falling because of gravity, the following formula can be used to determine the distance the object falls in a specific time period: d =1/2gt2 The variables in the formula are as follows: d is the distance in meters, g is 9.8, and t is the amount of time in seconds that the object has been falling. Create an application that allows the user to enter the amount of time that an object has fallen and then displays the distance that the object fell. The application should have a method named FallingDistance. The FallingDistance method should accept an object’s falling time (in seconds) as an argument. The method should return the distance in meters that the object has fallen during that time interval.

Chapter 11 Solutions

Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Time Complexity Analysis - How To Calculate Running Time | InterviewBit; Author: InterviewBit;https://www.youtube.com/watch?v=--oxG4Q1PA0;License: Standard YouTube License, CC-BY