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
aksik [14]
3 years ago
12

(true or false) A setter or getter method in object-oriented programming is an example of encapsulation.

Computers and Technology
1 answer:
marusya05 [52]3 years ago
5 0

Answer:

True.

Explanation:

Encapsulation wraps and bundle data under a single data(so external access to such variable outside of the class is restricted). Getter and Setters are functions that gets and sets a specific value within your object class. If you override the setter and getter function within the class(and not declare it in primary constructor), it allows to store and bind specific information about data inside the class.

You might be interested in
Write a program to prepare the monthly charge account statement for a customer of CS CARD International, a credit card company.
WITCHER [35]

Answer:

import java.util.*;

import java.text.*;

class CreditCardBill

{

public static void main(String[] args)

{

Scanner sc = new Scanner(System.in);

NumberFormat defaultFormat = NumberFormat.getCurrencyInstance(Locale.US);

System.out.println("CS Card International Statement");

System.out.println("===============================");

System.out.print("Previous Balance: $");

double prevBalance = sc.nextDouble();

System.out.print("Additional Charges: $");

double addCharges = sc.nextDouble();

double interest;

if(prevBalance == 0)

interest = 0;

else

interest = (prevBalance + addCharges) * 0.02;

System.out.println("Interest: "+defaultFormat.format(interest));

double newBalance = prevBalance + addCharges + interest;

System.out.println("New Balance: "+defaultFormat.format(newBalance));

double minPayment;

if(newBalance < 50)

minPayment = newBalance;

else if(newBalance <= 300)

minPayment = 50.00;

else

minPayment = newBalance * 0.2;

System.out.println("Minimum Payment: "+defaultFormat.format(minPayment));

}

}

5 0
3 years ago
You invested $2,300 in a stock. Your account now has a value of $2,643. Your percentage gain on the investment (rounded to the n
nasty-shy [4]
Your percentage gain on the investment was d)15%

To find percentage increase we subtract original number from new number.
2,643 - 2,300 = 343
Then we divide 343 by 2,300 = .1491
Then you multiply by 100. 
.1491 * 100 = 14.91
It is a 14.91% (rounded) increase.
So the nearest percent out of these options would be 15%.

Hope this helps you! (:
-Hamilton1757
4 0
4 years ago
Read 2 more answers
The part of a screen that holds its own document or message.
scZoUnD [109]
The icons is the answer
8 0
3 years ago
Which line in the following program contains the header for the showDub function? 1 #include 2 using namespace std; 3 4 void sho
Flura [38]

Answer:

The answer to this question is "15 line".

Explanation:

A function is a block of ordered, portable code used to perform a single, connected operation. The syntax of function declaration can be given as:

Syntax :

returntype functionName(parameter1, parameter2); //function prototype

or declaration

returntype functionName(parameter1, parameter2) //function definition or header of the function  

{  

//function body.

//function implementation

 //return value;

}

In the given question the header of the showDub function is on line 15.

That's why the answer to this question is "15 line".  

8 0
3 years ago
Help me due and like 20 minutes help this is science!!
Murljashka [212]

Answer:

16pi or 50.24

Explanation:

The area of a circle is pi(r)^2, and since r = 4, then the area is pi * 4^2 which is 16pi.

8 0
3 years ago
Other questions:
  • Information goes into a computer through _______ and comes our through _______
    6·2 answers
  • Imagine a situation where two developers are simultaneously modifying three different software components. what difficulties mig
    11·1 answer
  • ____, a Symantec product, offers a number of residential firewall and security applications that also provide various degrees of
    13·1 answer
  • Explain the use of keyboard shortcuts and key combinations. You are at the tenth page of a 20-page document. You need to make ch
    14·1 answer
  • A cybersecurity analyst is currently investigating a server outage. The analyst has discovered the following value was entered f
    9·1 answer
  • What shoul i get, Airpods or a ps4 cooling fan ???
    7·2 answers
  • Define the following term. data, database, DBMS, database system, data- base catalog, program-data independence, user wen', DBA,
    12·1 answer
  • When all the input has been read, your program should produce a summary report that includes a list of all the tokens that appea
    10·1 answer
  • 10. A loop statement is given as:
    7·1 answer
  • Advantages of special purpose computer
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!