Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
4th Edition
ISBN: 9780134787961
Author: Tony Gaddis, Godfrey Muganda
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 14, Problem 5PC
Solar System
Use the Circle class to draw each of the planets of our solar system. Draw the sun first, then each planet according to distance from the sun. (Mercury, Venus, Earth, Mars, Jupiter Saturn, Uranus, Neptune, and the dwarf planet, Pluto.) Label each planet using the Text shape class.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Briefly explain the concept of Encapsulation.
Also explain how Encapsulation can be achieved.
2. The following graphic shows the number of students in each class. Write code that
shows the given graphic. Number of the students who are taking the classes are 20, 30,
30, 10, 5, 5 for General Chemistry, General Physics, Mathematics, Mass Transfer, Fluid
Mechanics, Thermodynamics, respectively. The graphic does not have to be as exactly
as shown. Different codes, colours and modules can be used.
Classes
General Physics
Mathematics
General Chemistry
Thermodynamics
Fluid Mechanics
Mass Transfer
LOOK AT THE OUTPUT IMAGE CAREFULLY. IT NEEDS TO BE SAME.please make sure you input all details as like the output image.
Chapter 14 Solutions
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
Ch. 14.1 - Prob. 14.1CPCh. 14.1 - Prob. 14.2CPCh. 14.1 - Prob. 14.3CPCh. 14.1 - Prob. 14.4CPCh. 14.1 - In what package is the Color class?Ch. 14.1 - Prob. 14.6CPCh. 14.1 - Prob. 14.7CPCh. 14.1 - Prob. 14.8CPCh. 14.1 - Prob. 14.9CPCh. 14.1 - Prob. 14.10CP
Ch. 14.1 - Prob. 14.11CPCh. 14.1 - Prob. 14.12CPCh. 14.2 - Prob. 14.13CPCh. 14.2 - Prob. 14.14CPCh. 14.2 - Prob. 14.15CPCh. 14.2 - Prob. 14.16CPCh. 14.2 - Prob. 14.17CPCh. 14.2 - Prob. 14.18CPCh. 14.2 - Prob. 14.19CPCh. 14.2 - Prob. 14.20CPCh. 14.2 - Prob. 14.21CPCh. 14.3 - Prob. 14.22CPCh. 14.3 - Prob. 14.23CPCh. 14.3 - Prob. 14.24CPCh. 14.3 - Prob. 14.25CPCh. 14.3 - Prob. 14.26CPCh. 14.3 - Prob. 14.27CPCh. 14.3 - Prob. 14.28CPCh. 14.3 - Prob. 14.29CPCh. 14.3 - Prob. 14.30CPCh. 14.4 - What two classes do you use to play an audio file?Ch. 14.4 - Refer to your answer to Checkpoint 14.31. In what...Ch. 14.4 - Prob. 14.33CPCh. 14.4 - Prob. 14.34CPCh. 14.5 - What three classes do you use to play a video...Ch. 14.5 - Refer to your answer to Checkpoint 14.35. In what...Ch. 14.5 - Prob. 14.37CPCh. 14.6 - Prob. 14.38CPCh. 14.6 - Prob. 14.39CPCh. 14.6 - What type of event happens when the user presses...Ch. 14.6 - What KeyEvent method can you call to determine...Ch. 14.6 - Refer to your answer for Checkpoint 14.41. What...Ch. 14 - Line, Circle, and Rectangle are subclasses of...Ch. 14 - Prob. 2MCCh. 14 - Prob. 3MCCh. 14 - Prob. 4MCCh. 14 - Prob. 5MCCh. 14 - Prob. 6MCCh. 14 - Prob. 7MCCh. 14 - Prob. 8MCCh. 14 - This interpolator causes an animation to start...Ch. 14 - You use these two classes to play an audio file....Ch. 14 - Prob. 11TFCh. 14 - Prob. 12TFCh. 14 - True or False: If an ellipses X-radius and...Ch. 14 - Prob. 14TFCh. 14 - Prob. 15TFCh. 14 - Write a statement that instantiates the Line...Ch. 14 - Write a statement that instantiates the Circle...Ch. 14 - Prob. 3AWCh. 14 - Write code that does the following: Instantiates...Ch. 14 - Prob. 5AWCh. 14 - Write a statement that instantiates the Text...Ch. 14 - Prob. 7AWCh. 14 - Assume myBox is a Rectangle object. Write the code...Ch. 14 - Write code that creates a Circle, with a radius of...Ch. 14 - Prob. 10AWCh. 14 - Prob. 11AWCh. 14 - Prob. 1SACh. 14 - Prob. 2SACh. 14 - Prob. 3SACh. 14 - Prob. 4SACh. 14 - Prob. 5SACh. 14 - Prob. 6SACh. 14 - What RotateTransition class method do you use to...Ch. 14 - Prob. 8SACh. 14 - Prob. 9SACh. 14 - Prob. 10SACh. 14 - Prob. 11SACh. 14 - Prob. 1PCCh. 14 - Tree Age Counting the growth rings of a tree is a...Ch. 14 - Hollywood Star Make your own star on the Hollywood...Ch. 14 - Prob. 4PCCh. 14 - Solar System Use the Circle class to draw each of...Ch. 14 - Prob. 6PCCh. 14 - Prob. 7PCCh. 14 - Prob. 8PCCh. 14 - Coin Toss Write a program that simulates the...Ch. 14 - Lunar Lander The books online resources...Ch. 14 - Change for a Dollar Game The books online...Ch. 14 - Rock, Paper, Scissors Game Write a program that...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Describe the primary differences between the conceptual and logical data models.
Modern Database Management (12th Edition)
The spreadsheet in Microsoft Excel file Ch01Ex01_U10e.xlsx contains records of employee activity on special pro...
Using MIS (10th Edition)
What are the strategic options for legacy system evolution? When would you normally replace all or part of a sy...
Software Engineering (10th Edition)
What is the difference between a friend function for a class and a member function for the class?
Problem Solving with C++ (9th Edition)
Design an algorithm that does the following: opens the number_1ist.dat file that was created by the algorithm c...
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
A palindrome is a string that reads the same forward and backward, such as radar. Write a static recursive meth...
Java: An Introduction to Problem Solving and Programming (8th Edition)
Knowledge Booster
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
- Create two enumerations that hold colors and car modeltypes. You will use them as field types in a Car class and write ademonstration program that shows how the enumerations are used.arrow_forward#this is a python programtopic: operation overloading, Encapsulation please find the attached imagearrow_forward✓ Exercises Exercise: Write a method _ and _ that computes the region representing the intersection of two regions. Exercise: Write a method _contains__, which checks whether a n-dimensional point belongs to the region. Remember, a point belongs to the region if it belongs to one of the rectangles in the region. ✓ Membership of a point in a region #@title Membership of a point in a region def region_contains (self, p): ### YOUR SOLUTION HERE Region._contains = region_contains [ ] # Tests 10 points. assert (2, 1) in Region (Rectangle((0, 2), (0, 3)), Rectangle((4, 6), (5,8))) assert (2, 1) not in Region (Rectangle((0, 1), (0, 3)), Rectangle((4, 6), (5, 8))) Exercise: Write a method _le_ for regions such that R <= S if the region R is contained in the region S. You can test this by checking that the difference between R and S is empty.arrow_forward
- Create a BowlingTeam class The class has 2 fields: a field for the team name and an array that holds the team members’ names. Create get and set methods for the teamName field. Add a setMember method that sets a team member’s name. The method requires a position and a name, and it uses the position as a subscript to the members array. Add a getMember method that returns a team member’s name. The method requires a value used as a subscript that determines which member’s name to return. Create a BowlingTeamDemo class. In the main method include the following: Declare 2 variables: name and a constant NUM_TEAMS that holds 4 Bowling Team objects. Declare and instantiate an array teams of BowlingTeam objects. Using nested for loops, prompt the user to enter the 4 team names and enter the team members’ names. Using another nested for loop, output each team’s name and their team members’. Output should look like: Members of team The Lucky Strikes Carlos Diego Rose Lynn Members of team I…arrow_forwardCreate a MagicalPotionShop class, this class needs a field called potions. The potions field should be an ArrayList of the type Potion. Create a MagicalPotion class, this class needs two fields one called name, the other called effect. Both of the fields should be Strings.arrow_forwardAbstract Algera: Exhibit all 7 composition series for D8.arrow_forward
- Create a RightTriangle class given the following design: RightTriangle variables: base, height methods: 2 constructors, 1 that set default values and another that accepts to parameters. setBase - changes the base. Requires one parameter for base. setHeight - changes the height. Requires one parameter for height. getBase - returns the triangle base. getHeight - returns the triangle height. area - returns the area of the triangle (1/2bh) given the current base and heightarrow_forwardPlease do it in JavaScript or C# 1) Design and implement the class structure for a drawing application. A drawing is made up of a canvas that contains a collection of three different shapes: circles, lines, and boxes. Each shape can be drawn by calling a Draw() method for that shape. The canvas class should also have a draw method that draws all of the shapes it contains. You don’t have to actually draw anything on a screen; you can simulate drawing by writing a message to the console.For example, the code snippet: canvas.Draw();Drawing a circle at...Drawing a line at...etc. (For each shape on the canvas) 2)(Bonus) Consider re-writing the above answer (#1) differently where the canvas does not contain the shapes, but is able to draw any of the three shapes passed to it. Re-design canvas.Draw() if you need to. Your main() program should ask for user input on what shape to draw. Ask once, draw, then exit.could produce something like the following output to the console:arrow_forward#this is a python programtopic: operation overloading, Encapsulation Please find the attached imagearrow_forward
- For each object class include the following: displayPromotion () method which can be used to display the following messages:Video Game: Only certain of video game will be getting 10% discount.Sport Game: Booking court on week days will be getting 15% discount.Overridden toString() method that returns a string containing all the data fields’values.(photo 111) Write a driver program that uses a polymorphic array to store information for various video games and sport games. Use an array initializer to initialize the array with values. Then, display a list with all the game information. A sample output is provided below:(photo 112)arrow_forwardThe Spider Game Introduction: In this assignment you will be implementing a game that simulates a spider hunting for food using python. The game is played on a varying size grid board. The player controls a spider. The spider, being a fast creature, moves in the pattern that emulates a knight from the game of chess. There is also an ant that slowly moves across the board, taking steps of one square in one of the eight directions. The spider's goal is to eat the ant by entering the square it currently occupies, at which point another ant begins moving across the board from a random starting location. Game Definition: The above Figure illustrates the game. The yellow box shows the location of the spider. The green box is the current location of the ant. The blue boxes are the possible moves the spider could make. The red arrow shows the direction that the ant is moving - which, in this case, is the horizontal X-direction. When the ant is eaten, a new ant is randomly placed on one of the…arrow_forward8. Lo Shu Magic Square The Lo Shu Magic Square is a grid with 3 rows and 3 columns shown in Figure 7-19 Q. The Lo Shu Magic Square has the following properties: Figure 7-19 Lo Shu Magic Square 9 2 4 3 5 7 8 1 • The grid contains the numbers 1 through 9 exactly. • The sum of each row, each column, and each diagonal all add up to the same number. This is shown in Figure 7-20 D. Figure 7-20 Sums of the rows, columns, and diagonals 15 4 +15 7 +15 8 1 6 +15 15 15 15 15 In a program, you can simulate a magic square using a two-dimensional array. Write a function that accepts a two-dimensional array as an argument, and determines whether the array is a Lo Shu Magic Square. Test the function in a program.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Memory Management Tutorial in Java | Java Stack vs Heap | Java Training | Edureka; Author: edureka!;https://www.youtube.com/watch?v=fM8yj93X80s;License: Standard YouTube License, CC-BY