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
Alla [95]
4 years ago
15

Create a class called Name that will have three fields first name, middle initial, and last name as parameters. Add a constructo

r to the Name class that accepts a first name, middle initial, and last name as parameters (in that order) and initializes the Name object's state with those values. Write a complete program (i.e. with client class) to check your work. Please submit Name and client class .java files. [10 points]
Computers and Technology
1 answer:
KATRIN_1 [288]4 years ago
7 0

Answer:

The program to the given question can be given as:

Program:

import java.io.*; //import package for client class.

class Name //class-name Name.

{

// data members of the class.

String firstname, middleinitial, lastname;

// define parameterized constructor that would initialize data members

Name(String Fname,String Mname,String Lname)

{

this.firstname= Fname; //Using this key-word for holding value.

this.middleinitial= Mname;

this.lastname= Lname;

}

void showtime() //method showname with no return-type.

{

//define variable name for strore value.

String name;

name = firstname + " " + middleinitial + " " + lastname;

System.out.print(name); //print value.

}

}

class Main //main class

{

public static void main (String[] args) //main method.

{

Name ob =new Name("AAA","BBB","CCC");

//creating class object.and passing value to parameterized constructor.

ob.showtime();

//calling showtime function.

}

}

Output:

AAA BBB CCC.

Explanation:

The explanation of the program can be given as:

In this program, we create a class i.e. (Name). In class, we declare a variable that's data type is String because It is a sequence of characters that hold a string value. Then we define the parameterized constructor. It is used for holding string values in it. We define a function i.e. showtime. This function is used for string value that is passed in the constructor. Then we create the main class that has the main method. It is used for calling the Name class by creating its object. After creating a name class object we pass the value to the parameterized constructor. and call the function, Where it is a function that doesn't have any return type.

You might be interested in
Which wildcard character replaces a single character in the command-line interface?
pantera1 [17]

Answer:

? (the question mark)

Explanation:

The asterisk (*) matches one or more occurrences of any character, but the question mark matches exactly one.

6 0
3 years ago
which server edition doesn't support any server roles that you would typically use with standard version
ioda

On the standard version of Microsoft Windows, Dynamic Host Configuration Protocol Server and Hyper-V Remote Access are two roles that aren't supported on Azure Virtual Machines - a type of server.

<h3>What is a Server?</h3>

It is to be noted that this is a computer device (hardware) or virtual environment (software) that feeds another computer with special services.

<h3>Type of Server</h3>

The following are various types of servers:

  • Webserver
  • Proxy Server
  • Virtual Machine (VM)
  • Database Server
  • Mail Server

See the link below for more about Servers:

brainly.com/question/25435769

8 0
3 years ago
List 2 end to end test commands. <br><br> Will mark Brainliest!!
Delvig [45]

Answer:

ibm pll

Explanation:

4 0
3 years ago
What are the answers to 14 and 15
RoseWind [281]
The answer to 14 is c and the answer to 16 is a
6 0
4 years ago
Which of these describes, in increasing order, the file sizes of the same image in different formats? Group of answer choices
Nesterboy [21]

Answer:

If left being the shortest file size and right being the biggest file size...

It is JPEG, PNG, TIFF.

Explanation:

TIFF is used primarily for editing photos or for uncompressed high quality images for things like 4K textures. The file size will be bigger since generally it is uncompressed.

PNG reserves the maximum quality of the image and can not be compressed. (It can be compressed but the results are very minimal).

JPEG allows for the user to decide the compression and quality of the image. JPEG also doesn't hold transparency data, thus making JPEG generally use less space than PNG and definitely more than TIFF.  

8 0
3 years ago
Other questions:
  • Janelle is organizing an outline for an investigative report about the benefits of taking a 30-minute walk each day. which of th
    11·2 answers
  • You have connected thirteen pcs and laptops to a wireless network. to make your wlan more secure, what should you do to disallow
    11·1 answer
  • What OS is most commonly used by businesses? Linux Macintosh Microsoft Windows
    11·1 answer
  • A high school student is working as a summer intern at your company. Explain to the intern how viruses, malware, and spam impact
    11·1 answer
  • What important practice can help prevent hardware trouble?
    6·1 answer
  • What is digital scavenger hunting? A. An application that locates addresses B. A scavenger hunt where players use GPS and digita
    5·1 answer
  • Write a method named collapse that accepts an array of integers as a parameter and returns a new array where each pair of intege
    6·1 answer
  • What do you think color theory<br> in web design is?
    14·1 answer
  • What is the name of tool
    11·1 answer
  • The Horse table has the following columns:
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!