473,396 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 4224
dev7060
636 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.