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
Pls Help Me!!!!!!!!!!! It won’t work when I connect to ITunes!
BaLLatris [955]
Well, do you know your passcode? It should be the only reason for being disabled. Also, maybe you aren't logged in? That could be why... 
8 0
2 years ago
What Is the Purpose of a Web Browser? *<br><br>​
Aneli [31]
A web browser takes you anywhere on the internet. It retrieves information from other parts of the web and displays it on your desktop or mobile device. The information is transferred using the Hypertext Transfer Protocol, which defines how text, images and video are transmitted on the web.
6 0
2 years ago
Read 2 more answers
Assume that printStars is a function that takes one argument and returns no value. It prints a line of N stars (followed by a ne
trasher [3.6K]

Answer:

printStars(35);

Explanation:

public class Question {

   public static void main(String args[]) {

     printStars(35);

   }

   public static void printStars(int numberOfStars){

       for(int i = 1; i <= numberOfStars; i++){

           System.out.print("*");

       }

       System.out.print("\n");

   }

}

7 0
3 years ago
A ____________ would be a misconfiguration of a system that allows the hacker to gain unauthorized access, whereas a____________
Lynna [10]

Answer:

vulnerability, risk

Explanation:

A vulnerability would be a misconfiguration of a system that allows the hacker to gain unauthorized access, whereas a risk is a combination of the likelihood that such a misconfiguration could happen, a hacker’s exploitation of it, and the impact if the event occurred.

6 0
3 years ago
What is a motherboard?
laila [671]

Answer:

A mother board is something that helps a electronic run im guessing

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • You are tasked with setting up an employee’s computer.Instead of a new computer,she will be using a computer with an older opera
    11·2 answers
  • 3.What is deep focus, and when is it a good choice for a scene?
    8·1 answer
  • Which reading strategy refers to reading only the key words and phrases?
    13·2 answers
  • If a secret key is to be used as a _________ for conventional encryption a single number must be generated.
    13·1 answer
  • On the pie chart below, which “slice” represents 30% of the budget?
    8·1 answer
  • Which one of these do not belong on the Do's list in Helpful Hints when preparing a presentation: Which one of these do not belo
    8·1 answer
  • Please help I really need it
    7·1 answer
  • i need to also do a algorithm where if the total is a even number 10 points are added to the score and if the total is odd then
    11·1 answer
  • What is the maximum number of WildFire® appliances that can be grouped in to a WildFire® appliance cluster?
    7·1 answer
  • Which of the following that can be use to access session variables in PHP?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!