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]
3 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]3 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
Which of the following is not a type of user account? A. Administrator b. Guest c. Group d. Standard
Arlecino [84]
I've never heard of a group account so I'm going with.
C. Group
5 0
3 years ago
Most network behavior analysis system sensors can be deployed in __________ mode only, using the same connection methods as netw
soldier1979 [14.2K]
Most network behavior analysis system sensors can be deployed in passive mode only, using the same connection methods as network based idpss. Idps works as a network or host based systems. Most Nba sensors can be deployed in passive mode only too. The Nba examines the network traffic.
7 0
2 years ago
Presentation software allows users to what ?
zlopas [31]
Presentation software allows users to present information and/or information. They can send the organized information to their chosen contacts.
I hope this helps! :)
5 0
3 years ago
Read 2 more answers
True or False: To create a function in python, you start with the keyword "def"
Butoxors [25]

Answer:

true i think

Explanation:

8 0
3 years ago
Read 2 more answers
What is software and explain the five types of software
rewona [7]

Question: What is software and explain the five types of software

Explanation: The system software which is controlled and managed by the use of set of instructions and programs is called software.

Ex: Windows 7/8/10/xp etc...

the  types of software are'

system software and application software

Android.

CentOS.

iOS.

Linux.

Mac OS.

MS Windows.

Ubuntu.

Unix.

5 0
3 years ago
Read 2 more answers
Other questions:
  • Q3** Write a query to create a new price list for books written by the same author. Allow the user to enter only the first 4 let
    15·1 answer
  • Soo...My Old 3DS XL haven't been touched in around a year...So i tried to charge it but no LED lights opened..Even the power but
    14·1 answer
  • How would you define a relational database ?
    12·1 answer
  • People, can anyone point me a highlighter for google chorme ?
    11·1 answer
  • The printer prints 16 pages every minute. How many pages are printed in 6 minutes?
    14·2 answers
  • You are going to create an Arduino sketch where you have two push buttons, one piezo, one
    10·1 answer
  • WHICH PROGRAMMING LANGUAGES ARE THE BEST AND COMPATIBLE FOR 3D PRINTERS?
    12·1 answer
  • Which of the following IS an operating system? *<br> Reddit<br> Ubuntu<br> Office 365<br> Mac Pro
    9·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    14·1 answer
  • if we try to use tail-recursive rules to implement non-tail-recursive rules, it will normally result in rules that are
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!