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
riadik2000 [5.3K]
2 years ago
9

Write a method for the Invitation class that accepts a parameter and uses it to update the address for the event.

Computers and Technology
1 answer:
DerKrebs [107]2 years ago
6 0

Answer:

public class Invitation {

 private String hostname;

 private String address;

  public Invitation(String n, String a) {  // constructor that accepts two strings.

   hostname = n;

   address = a;

 }

  public String getHostname() {

   return hostname;

 }

 public void setAddress(String a) {

   address = a;

 }  

 public String invite(String guest) {

   return "Hello" +guest+ ", you are invited to my party at " +address+". "+hostname+".";

 }

 public Invitation(String host, String address) {

   this.address = address;

   this.hostname = host;

 }

}

Explanation:

The Java program defines a class called "Invitation". The class constructor has two string arguments or parameters for the host of the event and the address. The invite method is used to generate the string invite message with the name of the guest as the argument. Use the "setAddress" method to set a new location of the event and the "getHostname" to get the name of the event host.

You might be interested in
The readline method of bufferedreader returns _____ when end of file is reached.
Misha Larkins [42]

Answer:

null

Explanation:

it does not turn to null value. It returns ;

when it reaches the end of the file

6 0
1 year ago
Many programmers today use a(n) _________, which is software that helps them build their computer programs. eula cad sdlc ide
kipiarov [429]
The answer is Integrated Development Environment (IDE). Many programmers today use Integrated Development Environment (IDE) which is a software that helps them build their computer programs. It gives complete facilities to computer programmers for software development.  
8 0
3 years ago
Suppose we wish to put a set of names in alphabetical order. We call the act of doing so sorting. One algorithm that can accompl
Sergeeva-Olga [200]

Answer:

See explaination

Explanation:

We refer to a compiler as a special program that processes statements written in a particular programming language and turns them into machine language or "code" that a computer's processor uses. Typically, a programmer writes language statements in a language such as Pascal or C one line at a time using an editor.

Please kindly check attachment for the step by step solution

3 0
3 years ago
Rank these three account types in order of decreasing liquidity. Start by picking the most liquid account type first
Ghella [55]
As there are no options given, I will simply mention the three most liquid accounts in order:

<span>1. Checking Account
2. Savings Account
3. Money Market Deposit Account

Account liquidity refers to the ease and comfort with which you can take your money out of an account from a bank, there are various bank accounts which can be referred to as liquid assets.</span>
5 0
3 years ago
Read 2 more answers
Select the statement that best describes the function of the cell wall. O it gives shape to plants cells. O it produces food fro
Maslowich
It’s jelly like fluid surrounds the nucleus
8 0
2 years ago
Other questions:
  • Assume that getPlayer2Move works as specified, regardless of what you wrote in part (a) . You must use getPlayer1Move and getPla
    14·1 answer
  • How have search engines like Google, Bing, and Yahoo! revolutionized the ability to do research? They are more difficult to acce
    15·2 answers
  • What is an enterprise system
    14·2 answers
  • Im being timed please help!!
    7·2 answers
  • Which search engine do you prefer? Why
    15·2 answers
  • Some applications required advanced storage solutions are available to provide fault tolerance and high performance.
    13·1 answer
  • • Comments are blank which can be blank entered into documents
    5·1 answer
  • ________ take advantage of vulnerabilities in software. Group of answer choices Blended threats Bots Trojan horses Direct-propag
    6·1 answer
  • How to add a legend to a graph in excel?
    7·2 answers
  • Class ____________ allow you to create one version of a class, without having to replicate code to handle multiple data types.
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!