Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using java..... can someone help me write this program following the instructions in the pictures. Submission Notes Even though on-campus students wll submit the first

Using java..... can someone help me write this program following the instructions in the pictures.
image text in transcribed
image text in transcribed
Submission Notes Even though on-campus students wll submit the first page to your GA to assist in everyone must submit files to Web-CAT for grading. Those files are: 1. Picture.java 2 PietureTest.java Problem: Picture What You Will Do You will implement a class called Picture that has three pieces of data associated with it 1. size a whole number that represents the size of the picture in kilobyntes, must be 1 or larger 2 color -a boolean value that indicates it the picture is color or black and white tormat a string that indicates if the picture is in bmp peg, titt. png ,or git These are the only formats allowed. Should be stored in lowercase, but input may be in any case (i.e., TiFE should be legal and stored as tiff). You should write the following methods: a default constructor that initializes the size to 1, color to true, and format to none" an overloaded constructor that takes 3 parameters: an integer for the size, a boolean indicator for color and a String indicating the format 3. 3 accessor methods 4. 3 mutator methods 5. tostring method that prints out the information in the following format Picture is , XXX kb big, and in m format Then you will write the driver program PictureTest that will test all of the methods. Follow these stepe: 1. Test the default constructor by calling it and then using the accessors to print the values of the 3 attributes 2. Test the specific constructor by calling it using invalid values (one call per invalid value) and print the to ensure they default to the correct values. values of the 3 attributes after each call to ensure no bad values are stored. Test each mutator method with good values: call each mutator method separately with a valid parameter value. Then print the values of the 3 attributes after each call to ensure the correct values are stored. For 3

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

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions

Question

Contrast active and passive immunity.

Answered: 1 week ago