1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alexxx [7]
3 years ago
15

Which of the following statements are valid in Java? (Assume that console is Scanner object initialized to the standard input de

vice.) (i) r = console.nextDouble(); myCircle.area = 3.14 * r * r; System.out.println(myCircle.area); (ii) r = console.nextDouble(); myCircle.set(r); System.out.println(myCircle.area()); Only (i) Only (ii) Both (i) and (ii) None of these
Computers and Technology
1 answer:
san4es73 [151]3 years ago
6 0

Answer:

Both (i) and (ii) are valid in Java

Explanation:

In (i) 'area' is a variable property of the object myCircle. It could be assigned a value. In this case it has been assigned a value equal to the product of 3.14 and the square of the read input of type double from the keyboard.

After assigning a value to area, it could be printed directly to the console using the println method.

In (ii) 'area' is a method property of the object myCircle. It could be called when the value of the radius(r) has been set using a second method 'set' of myCircle. The call to myCircle.area() probably prints the area of the circle, myCircle, to the console.

In summary, though different, both are valid ways of doing the same thing.

Hope this helps!

You might be interested in
Which pair of Information Technology career fields may require work to be done outside of normal office hours? interactive media
scZoUnD [109]

Answer:

The answer to this question is "information services and support and network system administration".

Explanation:

The information support and service and network system administration is used to outside work, which can be explained as follows:  

  • The information support and service process is using information processing that is defined as the system for record-keeping, forms, figures and data in a business.  
  • A network or device system administrators are responsible for the day-to-day deployment of all these networks. They arrange, restore, and promote the computer systems of the company, which include local area networks, WANs, system sections, web services, and other wireless communication systems. The system provides local area networks.

6 0
4 years ago
Read 2 more answers
Q. Describe the T.V. as an ICT tool.​
Vikentia [17]

Answer:

TV or modern televisions are also a type of ICT tool because we get a wide amount of information about mass communication through the various news channels on the TV. TV is now also the most popular as well as a cheap medium of mass communication.

3 0
3 years ago
Xcvasdfgfdsasdfghjhgf
Cerrena [4.2K]

Well, The answer would be zxnisdnkfnxkzl since ndlsfd;gjfsdd is a forsfgfd operation. Also, the ffsldflslc is like the dfgfd. Keep that in mind when you are studying the ffsldflslc. It could be tough on the test.

3 0
3 years ago
Terrence smiles at his customers, helps his cowokers,and stays late when needed. What personal skill does Terrence demonstrate
adell [148]

Answer: Humility,kindness

Explanation:

5 0
3 years ago
Read 2 more answers
How to represent derived attributes in database?
Vlad1618 [11]

Answer:

Derived attribute can be defined as a type of attribute where its value will be derived from one or more of the other attributes of the same entity set.

Explanation:

An example of derived attribute is when we have an entity set called General. The set then has attributes like [Form], [Characteristics], [Address}, (Employment No).

(Employment No) which is represented distinctly in the attribute set can be called a derived attribute if it can be derived from one or more of the other attributes.

Derived attribute can be gotten through calculating values and not storing values.

For example, let us consider the following record of Teachers records;

(‘Teacher Number’, ‘Name’, ’Date of Birth’, Age today)

(‘E105’, ‘Samson’, ’07-Dec-1990’, 0)

This record shows that the teacher Samson was born on 7th of December, 1990. At the time of record insertion, he was born and 0 years old. What will be the value of his age on ’07-Dec-2000’? It is about 10 years. It clearly shows that the value is not fixed and it is a variable whenever the DOB is adjusted.

Therefore, we are not creating our table with derived attributes in it. Instead, the values ofderived attributes can be calculated at the time of retrieval and shown to the user. Hence, the record will look like as follows;

(‘E105’, ‘Samson’, ’07-Dec-1990’)

This means that 0 is a derived attribute from the Date of birth.

7 0
3 years ago
Other questions:
  • The document theme does not determine the appearance of the styles. true or false
    13·2 answers
  • What prefix describes a mass that is 1000 times smaller than a gram
    5·2 answers
  • You work in the educational software industry. Your boss asks you to give a brief lecture to other employees about the digital d
    7·2 answers
  • You’re browsing the internet and realize your browser is not responding. Which of the following will allow you to immediately ex
    11·1 answer
  • How do myths impact today’s society.(A
    14·2 answers
  • What is the value of the cost variable after the following code snippet is executed? int cost = 82; if (cost < 100) { cost =
    15·1 answer
  • The greatest predictor of home Internet use is _____. income location race training
    5·2 answers
  • The current standard for RFID is based off of Group of answer choices MIT standards IEEE standards ISO standards there is no agr
    12·1 answer
  • What is the name of tool
    11·1 answer
  • Help ASAP
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!