and Data Structures, 13th Edition by
Y Daniel Liang
Complete Chapter Solutions
Manual are included
** Immediate Download
** Swift Response
** All Chapters included
** Sample Exams
** ABET Course Assessment
** Sample Projects
** Programming Exercises
,Table of Contents are given below
1.Introduction to Computers, Programs, and Java
2.Elementary Programming
3.Selections
4.Mathematical Functions, Characters, and Strings
5.Loops
6.Methods
7.Single-Dimensional Arrays
8.Multidimensional Arrays
9.Objects and Classes
10.Object-Oriented Thinking
11.Inheritance and Polymorphism
12.Exception Handling and Text I/O
13.Abstract Classes and Interfaces
14.JavaFX Basics
15.Event-Driven Programming and Animations
16.JavaFX UI Controls and Multimedia
17.Binary I/O
18.Recursion
19.Generics
20.Lists, Stacks, Queues, and Priority Queues
21.Sets and Maps
22.Developing Efficient Algorithms
23.Sorting
24.Implementing Lists, Stacks, Queues, and Priority Queues
25.Binary Search Trees
26.AVL Trees
27.Hashing
28.Graphs and Applications
29.Weighted Graphs and Applications
30.Aggregate Operations for Collection Streams
, Solutions for UML Class Diagrams
Chapter 9
Exercise 9.1: Rectangle
Rectangle
width: double The width of this rectangle (default 1).
height: double The height of this rectangle (default 1).
Rectangle() Constructs a default rectangle.
Rectangle(width: double, height: double) Constructs a rectangle with the specified width and height.
getArea(): double Returns the area of this rectangle.
getPerimeter(): double Returns the perimeter of this rectangle.
Exercise 9.2: Stock
Stock
symbol: String The symbol of this stock.
name: String The name of this stock.
previousClosingPrice: double The previous closing price of this stock.
currentPrice: double The current price of this stock.
Stock(symbol: String, name: String) Constructs a stock with a specified symbol and a name.
getChangePercent(): double Returns the percentage of change of this stock.
Exercise 9.6: StopWatch
get methods for all data fields are provided and omitted for
StopWatch brevity.
-startTime: long
-endTime : long
+StopWatch() Constructs a StopWatch object.
+start(): void Starts the watch.
+stop(): void Stops the watch.
+getElapsdTime(): long Returns the elapsed time for the stop watch in milliseconds.
1
, Exercise 9.7: Account
Account
-id: int The ID of this account (default 0).
-balance: double The balance of this account (default 0).
-annualInterestRate: double The annual interest rate of this account (default 0).
-dateCreated: java.util.Date The date when this account was created.
+Account() Constructs a default account.
+Account(id: int, balance: double) Constructs an account with the
specified ID and balance.
+getId(): int Returns the ID of this account.
+getBalance(): double Returns the balance of this account.
+getAnnualInterestRate(): double Returns the interest rate of this account
+getMonthlyInterestRate(): double Returns the monthly interest rate of this account
+getDateCreated(): java.util.Date Returns the date when this account was created.
+setId(id: int): void Sets a new ID of this account.
+setAnnualInterestRate( Sets a new interest rate for this account.
annualInterestRate: double): void
+getMonthlyInterest(): double Returns the monthly interest of this account.
+withdraw(amount: double): void Withdraws the specified amount from this account.
+deposit(amount: double): void Deposits the specified amount to this account.
Exercise 9.8: Fan
Fan
+SLOW = 1 Constant.
+MEDIUM = 2 Constant.
+FAST = 3 Constant.
-speed: int The speed of this fan (default 1).
-on: boolean Indicates whether the fan is on (default false).
-radius: double The radius of this fan (default 5).
-color: String The color of this fan (default white).
+Fan() Constructs a fan with default values.
+getSpeed(): int Returns the speed of this fan.
+setSpeed(speed: int): void Sets a new speed for this fan.
+isOn(): boolean Returns true if this fan is on.
+setOn(on: boolean): void Sets this fan on to true or false.
+getRadius(): double Returns the radius of this fan.
+setRadius(radius: double): void Sets a new radius for this fan.
+getColor(): String Returns the color of this fan.
+setColor(color: String): void Sets a new color for this fan.
+toString(): String Returns a string representation for this fan.
Exercise 9.9: RegularPolygon
2