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.
The answer is True. <span>The company database may be stored on a central database server and managed by a database administrator. </span>
Answer:
- def calcSum(d):
- sum = 0
- for x in d:
- sum += int(x)
- return sum
-
- digits = input("Please enter your digits: ")
- print(calcSum(digits))
Explanation:
The solution code is written in Python.
Firstly, create a function that take one input digit string (Line 1).
In the function, create a sum variable with initial value 0.
Use a for loop to traverse through each character in the digit string and in the loop use int method to convert each character to integer and add it to sum variable (Line 3-5) and return the sum as output.
Next, use input function to prompt user enter a digit string (Line 7).
Lastly test the function by passing the input digit as argument and print the result (Line 8).
Some of the online activities among businesses are:
- SEO consultant. ...
- Web designer or web developer. ...
- Blogger. ...
- Virtual assistant. ...
- Affiliate marketer, etc
<h3>What are Online Activities?</h3>
This refers to the various activities that are done on the world wide web and is usually used by businesses to increase visibility, and in turn, revenue.
Hence, we can see that the use of online activities by businesses are important because the products and services for sale by businesses are advertised to target audiences through some of the aforementioned activities.
Read more about online activities among businesses here:
brainly.com/question/27172895
#SPJ1