Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please answer question 3,4 and 5 (13 unsider the following class and the main below. Trace the code then answer the questions on the right

image text in transcribed

please answer question 3,4 and 5

(13 unsider the following class and the main below. Trace the code then answer the questions on the right public class SomeClass { 3. How many objects are created in the main? private String aName; private int aNumber; 4. What is the initial state of each private boolean amAwesome; object? (What are the values of each public SomeClass(String name, int number) { object's variables?) aName = name; aNumber = number; amAwesome = true; } public SomeClass(String name, int number, boolean awesome) { aName = name; aNumber - number; 5. What is the state of each object amAwesome awesome; just before the main method exits? } public void methodAwesome (int number) { if(amAwesome) aNumber += number - 5; amAwesome = I amAwesome; } public int methodFantastic boolean fantastic){ fantastic = fantastic && anAwesome; if(!fantastic && aNumber > 0) aName - aName + is fantastic"; return aNumber *. -2; } public void methodAmazing(int num) { if(aNumber

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

Step: 3

blur-text-image

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

Database And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students also viewed these Databases questions

Question

Question How are VEBA assets allocated when a plan terminates?

Answered: 1 week ago

Question

Question May a taxpayer roll over money from an IRA to an HSA?

Answered: 1 week ago

Question

Question What is the doughnut hole in HSA coverage?

Answered: 1 week ago