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.
Answer:
Bjarne Stroustrop published the first reference guide for C++
Explanation:
Bjarne Stroustrop is a computer scientist who created the C++ programming language while working at the AT&T Bell laboratory. He also published the first reference guide for the programming language.
In October 1985, the book, The C++ Programming Language, was published. It describes the c++ programming language and was the only documentation and reference guide for the programming language at the time. Newer editions have since been published.
Lipids are fat and carbohydrates are used to provide your body with energy so they are always being used