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
Olegator [25]
3 years ago
6

Class members are accessed via the ____(1)_____ operator in conjunction with the name of an object of the class, or via the ___(

2)_____ operator in conjunction with a pointer to an object of the class.
Computers and Technology
1 answer:
Alborosie3 years ago
5 0

Answer:

1.ClassName and . operator

2. ClassName and [] operator

Explanation:

There are two ways to get the members of a class first one is by using dot(.) operator.

Example : with assumption that person is a class object and age is the member in it we can use it as:

person.age

Second way is to use [] operator with member as a string in it which is used by the compiler as key to get its value.

Example : person["age"]

You might be interested in
HELP ME PLEASE
seraphim [82]

Answer:

Questions and answers

Explanation:

3 0
2 years ago
In this scenario, two friends are eating dinner at a restaurant. The bill comes in the amount of 47.28 dollars. The friends deci
pickupchik [31]

Answer:

The java program for the given scenario is as follows.

import java.util.*;

import java.lang.*;

public class Main

{

   //variables for bill and tip declared and initialized

   static double bill=47.28, tip=0.15;

   //variables for total bill and share declared

   static double total, share1;

public static void main(String[] args) {

    double total_tip= (bill*tip);

    //total bill computed

    total = bill + total_tip;

    //share of each friend computed

    share1 = total/2;

    System.out.printf("Each person needs to pay: $%.2f", share1);  

}

}

Explanation:

1. The variables to hold the bill and tip percent are declared as double and initialized with the given values.

static double bill=47.28, tip=0.15;

2. The variables to hold the values of total bill amount and total tip are declared as double.

3. All the variables are declared outside main() and at class level, hence declared as static.

4. Inside main(), the values of total tip, total bill and share of each person are computed as shown.

double total_tip= (bill*tip);

total = bill + total_tip;

share1 = total/2;

5. The share of each person is displayed to the user. The value is displayed with only two decimal places which is assured by %.2f format modifier. The number of decimal places required can be changed by changing the number, i.e. 2. This format is used with printf() and not with println() method.

System.out.printf("Each person needs to pay: $%.2f", share1);  

6. The program is not designed to take any user input.

7. The program can be tested for any value of bill and tip percent.

8. The whole code is put inside a class since java is a purely object-oriented language.

9. Only variables can be declared outside method, the logic is put inside a method in a purely object-oriented language.

10. As shown, the logic is put inside the main() method and only variables are declared outside the method.

11. Due to simplicity, the program consists of only one class.

12. The output is attached.

5 0
3 years ago
Read 2 more answers
Only one person can receive the same email at the same time true or false
nasty-shy [4]

Answer:

false

Explanation:

5 0
2 years ago
Hilda is troubleshooting a problem with the encryption of data. at which layer of the osi reference model is she working?
Fittoniya [83]
The la<span>yer of the osi reference model that hilda is currently working on is: presentation
On Osi reference model, the presentation layer is created </span><span>to take care of the semantics and syntax of the information exchanged between two systems. The presentation layer will make sure that the receiver of the information will understand the data that being given.</span>
7 0
3 years ago
What are examples of scanning devices?
eimsori [14]

Here the examples of scanning devices :

  • Drum Scanner.
  • Handheld Scanner.
  • Flatbed Scanner.
  • Optical Character Recognition.
  • Magnetic Ink Character Recognition.
  • Image Scanner.

<h3>What is meant by scanning ?</h3>
  • A text is scanned quickly in order to find a specific piece of information. In daily life, scanning is regularly used for tasks like looking up a word in a dictionary or finding a friend's name in your phone's contacts list.
  • Scanners may basically be divided into three categories. These consist of network scanning, port scanning, and vulnerability scanning.
  • There are three different types of scanners: portable scanners, flatbed scanners, and drum scanners. While flatbed scanners are commonly used in offices and classrooms, drum scanners are mainly used in the publishing industry to print high-quality pictures.
  • Three processes make up the basic scanning process: scan, register, and detail.

Learn more about scanning refer to :

brainly.com/question/25106178

#SPJ4

4 0
9 months ago
Other questions:
  • A deleted file or folder is not permanently deleted from a computer until which event occurs? The computer is restarted. The Rec
    13·2 answers
  • Abram was asked to explain to one of his coworkers the XOR cipher. He showed his coworker an example of adding two bits, 1 and 1
    7·1 answer
  • How many apostrophes or quotation marks in a row should you use to begin and end a multi-line string?
    14·2 answers
  • Which hardware component is most suspect if a user can barely make out
    10·1 answer
  • True or False: When you share something on a friend’s Timeline, only that friend can see it.
    5·2 answers
  • Select the correct answer.
    13·2 answers
  • Delete temp or %temp% files in Windows 10 is safe and, can it help boost up your PC fps?
    5·1 answer
  • The getElementById DOM Method do?
    13·1 answer
  • Describe your previous personal or professional experience with Microsoft Word.
    9·1 answer
  • How do you save a document in a format so that any reader can view it?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!