468,167 Members | 1,959 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,167 developers. It's quick & easy.

Java Class and Object

Hi i am currently Java student and i am a bit confused, i have to create class for Cell Phone, so far so good i created class and i need to show info of three cellphone i created, it is good to, i created it and even create a public void showInfo() in order to show the info of each object now the next step i need to do is this:

Display only the modified attributes of the three objects. All outputs showing only the price of a cell phone (i.e. not the rest of the attributes) must be formatted.

I just don't understand the question i feel like i missed a bit in the class maybe because i didn't hear it (i have hearing disabilities) I tried to find anything that might help me to clarifiy in the lecture note and nada maybe I understood wrong but the way i understand is i need to show only modified value like for example: i create a cellphone with brand named Samsung, year 2014, price of $500 and i change the price to let say $350, it only show $350... Did I understand it right? if so I have no clue how to do it :( just need a direction to look or a hint
Dec 17 '19 #1
2 3857
dev7060
413 Expert 256MB
Display only the modified attributes of the three objects. All outputs showing only the price of a cell phone (i.e. not the rest of the attributes) must be formatted.
Use conditionals to check if the specific attribute is modified.
Dec 18 '19 #2
Ishan Shah
47 32bit
If you are storing cellphone data (brand_name and price) in the array list then you can use the list.set() method by an object index number and new value which you want to be set.
Dec 3 '20 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Phil Powell | last post: by
8 posts views Thread by Fu Bo Xia | last post: by
24 posts views Thread by Hung Jung Lu | last post: by
1 post views Thread by cartooncat | last post: by
4 posts views Thread by simon | last post: by
12 posts views Thread by Mark Fink | last post: by
4 posts views Thread by Dan | last post: by
reply views Thread by gcreed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.