473,461 Members | 2,283 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 4227
dev7060
638 Expert 512MB
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

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

Similar topics

0
by: Phil Powell | last post by:
URL: http://valsignalandet.com/cookiegrab.php?name=valIdentifier This page produces a cookie value and sends it back as HTML using PHP and Javascript to obtain it. This URL will be used as the...
8
by: Fu Bo Xia | last post by:
the java.lang.Object.forName method takes a java class name and returns a Class object associated with that class. eg. Class myClass = Object.forName("java.lang.String"); by if i only know the...
24
by: Hung Jung Lu | last post by:
Hi, Does anybody know where this term comes from? "First-class object" means "something passable as an argument in a function call", but I fail to see the connection with "object class" or...
1
by: dennis | last post by:
Hi, I need to access Java object through an ASP page. I reckon that there are two ways: 1) If the Java object is registered as a COM then access it through the ProgID using CreateObject method....
1
by: cartooncat | last post by:
I have to translate an ASP project to ASP.NET, in the former project, a java class object was used by VBScript: Set Obj = Server.CreateObject("ccb.pub.RSAsig") Obj.generateKeys()...
11
by: Xiaoshen Li | last post by:
Dear Sir, I am a little puzzled about a function returning a class object, for example, suppose I hava a class Money and a method: Money lastYear(Money aMoney) { Money tempMoney; ......
4
by: simon | last post by:
hello, may have a need shortly to call a java class from a vb.net web app. basically the java class would serve as an email creation/sending function. i realize this all could be done in .net,...
12
by: Mark Fink | last post by:
I wrote a Jython class that inherits from a Java class and (thats the plan) overrides one method. Everything should stay the same. If I run this nothing happens whereas if I run the Java class it...
0
by: neroliang | last post by:
PyLucene Homepage: pylucene.osafoundation.org 1.Quotas from PyLucene: """ Technically, the PyLucene programmer is not providing an 'extension' but a Python implementation of a set of methods...
4
by: Dan | last post by:
Hi All, I've got a problem with my C++ application that calls a Java class that I've built with GCJ, I can't run it because I get errors: multiple definition of `atexit' first defined here...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.