1) Implement the class Image: The height, width and size data fields should be positive. The resize(Percentage: double) method should modify the height, width and the size of the Image as follow: the new height = old height * Percentage /100 the new width = old width * Percentage /100 the new size = old size * Percentage* Percentage /100 The DisplayInfo) method display a string that describes the Image. For example: Image_0123 , 23*53cm , 412KB , HD Or Image_0123 , 23*53cm , 412KB , NOT HD

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter15: Using Javafx And Scene Builder
Section: Chapter Questions
Problem 16RQ
icon
Related questions
Question
100%
What is the solution for this question( using java language)
Image
- name: String //default "img_n"
- date: Date// the date of creation of this image
height: double //default 0
- width: double //default 0
- size: double // default 0
isHD: boolean //default true
+ Image( )
+ Image (name:String, height:double,
width:double, size:double, isHD:boolean)
+ All getters
+ All setters
+ resize(Percentage:double):void
+ DisplayInfo():void
Transcribed Image Text:Image - name: String //default "img_n" - date: Date// the date of creation of this image height: double //default 0 - width: double //default 0 - size: double // default 0 isHD: boolean //default true + Image( ) + Image (name:String, height:double, width:double, size:double, isHD:boolean) + All getters + All setters + resize(Percentage:double):void + DisplayInfo():void
1) Implement the class Image :
The height, width and size data fields should be positive.
The resize(Percentage: double) method should modify the height, width and the size of the
Image as follow:
the new height = old height * Percentage /100
the new width = old width * Percentage /100
the new size = old size * Percentage* Percentage /100
The DisplayInfo) method display a string that describes the Image. For example:
Image_0123 , 23*53cm , 412KB , HD
Or
Image_0123 , 23*53cm , 412KB , NOT HD
Transcribed Image Text:1) Implement the class Image : The height, width and size data fields should be positive. The resize(Percentage: double) method should modify the height, width and the size of the Image as follow: the new height = old height * Percentage /100 the new width = old width * Percentage /100 the new size = old size * Percentage* Percentage /100 The DisplayInfo) method display a string that describes the Image. For example: Image_0123 , 23*53cm , 412KB , HD Or Image_0123 , 23*53cm , 412KB , NOT HD
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Class
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT