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
Alex17521 [72]
3 years ago
13

The Employee class will contain a String attribute for an employee’s name and a double attribute for the employee’s salary. Whic

h of the following is the most appropriate implementation of the class?
a. public class Employee

{
public String name;
private double salary;
// constructor and methods not shown
}

b. public class Employee
{
private String name;
private double salary;
// constructor and methods not shown
}

c. private class Employee
{
public String name;
public double salary;
// constructor and methods not shown
}

d. private class Employee
{
private String name;
private double salary;
// constructor and methods not shown
}
Computers and Technology
1 answer:
MAVERICK [17]3 years ago
5 0

Answer:

The answer is "Option b".

Explanation:

In the choice b, a public class "Employee" is declared, in which two private variables "name and salary" is declared whose data type is a string and double. At this, the class is accessible outside the scope but it variable accessible in the class only and the wrong choice can be defined as follows:

  • In choice a, datatypes access modifiers were different that's why it is wrong.
  • In choice c and d both classes use a priavte access modifier, which means it can't accessible outside that's why it is wrong.

You might be interested in
When entering a formula into a cell, you begin with are calculations a spreadsheet program applies to data. are preset calculati
Ugo [173]

Answer:

When entering a formula into a cell, you begin with  an equal sign

Functions and formulas are calculations a spreadsheet program applies to data.

Functions are preset calculations within spreadsheet software.

Formulas are user-entered calculations that may contain cell references, numerical values, and preset calculations.

Explanation:

I did the assignment on Edge 2020.

7 0
3 years ago
A(n) _______ is text or a graphic you can click to jump to another file or to somewhere else in the same file. quizle
Paul [167]
Hyperlink



______________________________
5 0
3 years ago
Someone help me I don’t know what to do /COMPUTER SCIENCE
nydimaria [60]
It kind of depends on the intended language, but I can see the following mistakes:

- lines not terminated with a semicolon (but not all languages require this)
- while statement missing parenthesis, ie., while (num1 <= num2), also not required in all languages
- statements below the while statement must be grouped by curly braces
- num1+5 should be num1=num1+5 or num1 += 5

Output will be:

10
15
20
25
30
5 0
4 years ago
It is better to know the main components of all computer programming languages than to memorize the rules for all of the languag
Jlenok [28]

Answer: true

Explanation:

7 0
3 years ago
Read 2 more answers
Why is this app here to help but wont let me see answers to my questions?
UkoKoshka [18]

Answer:

maybe you need to reload the page and press the little bell on the right side and u should get a notification when somebody answers your question and if that doesnt help go to your profile and press the tab (on this tab if that makes since) it should say sumin like questions you asked and u should press the ones u need the answers to

Explanation:

lmk if this helped

5 0
3 years ago
Read 2 more answers
Other questions:
  • You have created shared folders for all your companies departments and assigned the appropriate permissions. everyone can access
    8·1 answer
  • In a case where electrical current leakage from the circuit occurs, the GFCI would do the following:
    10·1 answer
  • The following are the CPU and I/O behavior of three processes, timings in seconds.
    9·1 answer
  • All the following are the basis of the World Wide Web except:
    14·2 answers
  • Irene is creating a wireframe of a website she is working on to show her client. In which phase of the development process is sh
    13·1 answer
  • Write code that prints: Ready! firstNumber ... 2 1 Run! Your code should contain a for loop. Print a newline after each number a
    15·1 answer
  • Given a MxN matrix.Print the elements in odd rows from left to right and the elements in even rows from right to left.(Java or C
    11·1 answer
  • Help with Java, please!
    5·1 answer
  • Universal containers wants internal support requests to be directed to any of the IT reps. They want external support requests t
    9·1 answer
  • many police departments coordinate youth-oriented programs as part of their prevention efforts. which of the following is not an
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!