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
Vinil7 [7]
3 years ago
11

#Create a class called Name. Name should have two attributes

Computers and Technology
1 answer:
prisoha [69]3 years ago
3 0

Answer:

//class Name

class Name {

// attributes gave you 3

String first_name;

String last_name;

int length = 0;

//constructor with 2 parameters

Name(String first_name, String last_name){

}

//methods

public String find_printed_name(){

return first_name + " " + last_name;

}

public void find_sortable_name(){

return last_name + ", " first_name.charAt(0);

}

public static void main(String[] args){

// instantiate the class

Name test_name = new Name("David", "Joyner");

System.out.println(test_name.first_name);

System.out.println(test_name.last_name);

System.out.println(test_name.find_printed_name());

System.out.println(test_name.find_sortable_name());

}

Explanation:

You didn't specify a language so I did it in Java.

You should know how to declare methods in Python.

You might be interested in
Which tool in Access will give you a detailed report showing the most accurate and complete picture of
Angelina_Jolie [31]

The Query tool is the tool in MS access that will give user detailed report showing the most accurate and complete picture of employee attendance grouped by day

<h3>What is the Query tool?</h3>

The Query tool helps to give answer to a simple question, perform calculations, combine data from a database

In conclusion, the Query tool is the tool in MS access that will give user detailed report showing the most accurate and complete picture of employee attendance grouped by day

Read more about Query tool

<em>brainly.com/question/5305223</em>

4 0
2 years ago
Select the correct answer.
Softa [21]

Answer:

MY ANSWER IS B.

Explanation:

B.A+(B.C)

3 0
3 years ago
An organization has a website with a guest book feature, where visitors to the web site can input their names and comments about
kozerog [31]

Answer:

B

Explanation:

6 0
3 years ago
Read 2 more answers
(50 points) Write a programthat adds the first and last elements of an integer array and stored as the first element of the outp
Elena L [17]

Answer:

A is the input array

B = [] ; %B is initially an empty array

for i = 1:length(A)/2  %iterates over A until the midpoint of A

   B(i) = A(i) + A(end + 1 - i);  %This adds the numbers from the first half and %second half of A, and stores in B

end

disp(B)

3 0
3 years ago
Which type of photoreceptor is best able to process bright light and color?
Scilla [17]
Cone cells, or cones, are one of three types of photoreceptor cells in the retina of mammalian eyes. They are responsible for color vision and function best in relatively bright light, as opposed to rod cells, which work better in dim light.
4 0
3 years ago
Other questions:
  • 7 features of QBASIC
    6·1 answer
  • Ned and mary ann are saving their files to a cd
    15·1 answer
  • Kuta software infinite pre- algebra multiplying polynomial and a monomial find product answer key
    14·1 answer
  • Does anyone know this page for drivers ed?
    9·1 answer
  • What is a row of data in a database called?<br> Field<br> File<br> Record<br> Title
    10·1 answer
  • IN WHICH COUNTRY DO THEY LET YOU PLAY MINECRAFT IN SCHOOL?
    8·2 answers
  • Magbigay ng ibang produkto na ginagamitan ng kasanayan ng basic sketching shading at outlining ​
    12·1 answer
  • Anyone wanna join my giggl?
    11·2 answers
  • Does anybody know how to get this little search bar thing off of my task bar on a HP laptop.
    12·1 answer
  • What would give Lucy, an entry-level candidate, an edge over others while she seeks a programmer’s position? Lucy, an entry-leve
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!