answer.
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
inessss [21]
2 years ago
5

Assume that given , middle and family are three variables of type string that have been assigned values . Write an expression wh

ose value is a string consisting of the first character of given followed by a period followed by the first character of middle followed by a period followed by the first character of family followed by a period: in other words, the initials of the name . So if the values of these three variables were "John" "Fitzgerald" "Kennedy", then the expression 's value would be "J.F.K."
Computers and Technology
1 answer:
Rama09 [41]2 years ago
4 0

Answer:

String initials = given.charAt(0) + "." + middle.charAt(0) + "." + family.charAt(0) + "." ;

Explanation:

The code has been written in Java.

To get the first character of a String variable say, name, the syntax is:

name.charAt(0);

Zero(0) in the above expression indicated the position of the first character.

Therefore, to get the first character of the string given, we have

given.charAt(0).

To get the first character of the string middle, we have:

middle.charAt(0);

To get the first character of the string family, we have:

family.charAt(0);

Concatenating all of these first characters together and separating them by a period(.) we have;

given.charAt(0) + "." + middle.charAt(0) + "." + family.charAt(0) + "." ;

These will form a string which can be stored in a String variable, say 'initials', as follows;

String initials = given.charAt(0) + "." + middle.charAt(0) + "." + family.charAt(0) + "." ;

Hope this helps!

You might be interested in
1. Create a view named customer_addresses that shows the shipping and billing addresses for each customer.
Verdich [7]

Answer:

Answer given below

Explanation:

1.

CREATE VIEW CustomerAddresses AS

SELECT custo. CustomerID, EmailAddress , LastName ,FirstName,

bill.Line1 AS BillLine1, bill.Line2 AS BillLine2, bill.City AS BillCity, bill.State AS BillState, bill.ZipCode AS BillZip,

ship.Line1 AS ShipLine1, ship.Line2 AS ShipLine2, ship.City AS ShipCity, ship.State AS ShipState, ship.ZipCode AS ShipZip

FROM Customers custo , Addresses ship , Addresses bill

WHERE custo. BillingAddressID= bill.AddressID AND custo.ShippingAddressID= ship. AddressID;

2.

SELECT CustomerID, LastName, FirstName, BillLine1 FROM CustomerAddresses;

3.

CREATE VIEW OrderItemProducts

AS

SELECT Orders.OrderID, OrderDate, TaxAmount, ShipDate,

ItemPrice, DiscountAmount, (ItemPrice- DiscountAmount) AS FinalPrice,

Quantity, and (Quantity * (ItemPrice-DiscountAmount)) AS ItemTotal,

ProductName FROM

Orders, OrderItems, Products

WHERE

Orders.OrderID = OrderItems.OrderID AND

OrderItems.ProductID = Products. ProductID;

4.

CREATE VIEW ProductSummary

AS

SELECT distinct

ProductName, COUNT(OrderID) AS OrderCount, SUM(ItemTotal) AS OrderTotal

FROM

OrderItemProducts

GROUP BY ProductName;

5.

SELECT ProductName, OrderTotal

FROM ProductSummary P

WHERE 5> (select count(*) FROM ProductSummary S

WHERE P.OrderTotal<S.OrderTotal)

ORDER BY OrderTotal;

5 0
2 years ago
Viet drives around and checks meters to document the amount of electricity used in homes. What Energy pathway is he a part of? E
Svet_ta [14]
As Viet drives around and checks meters to document the amount of electricity used in homes he would be part of the energy distribution process since the electricity is distributed off  a power line into the house and then within the house by the wiring to the lights and the electrical outlets for usage by the inhabitants.
7 0
2 years ago
Read 2 more answers
If you’d like to have multiple italicized words in your document, how would you change the font of each of these words?
Mariana [72]
You select the words and then format - italics
5 0
2 years ago
Read 2 more answers
suppose that you have been given the task of writing an unloader - that is, a piece of software that can take the image of a pro
Brums [2.3K]
............;(&;&;$;!:$:!;$;8;$;$;;$;&8;$;$;$;$;$;$;$;$;$;
8 0
2 years ago
Cloud-based services can open doors to leveraging Artificial Intelligence (AI) without dramatically increasing risk. Which clien
vladimir1956 [14]

Answer:

Explanation:

The clients that would be best suited for this opportunity would be small business or business' that do not have the hardware/space resources necessary to create the computing power that they need. Instead, they can simply pay for these cloud-based services which provide all of the necessary computing/hardware power and resources necessary so that the company can easily fulfill all of their tasks without any problems. Bigger companies can easily pay for and implement their own hardware to solve their problems which may benefit them even more in the long-term.

7 0
1 year ago
Other questions:
  • A router is involved in ____________ layers of the tcp/ip protocol suite.
    12·1 answer
  • 1. Show that the three security services-confidentiality, integrity, and availabilty- are sufficient to deal with the threats of
    10·1 answer
  • Write a C program that inputs four strings that represent integers, converts the string to integers, sums the values and prints
    10·1 answer
  • The ______ network became functional in 1969, linking scientific and academic researchers across the United States. Group of ans
    7·2 answers
  • Enter a nested function in cell G8 that displays the word Flag if the Payment Type is Credit and the Amount is greater than or e
    9·1 answer
  • Wendy is an attacker who recently gained access to a vulnerable web server running Microsoft Windows. What command can she use t
    9·1 answer
  • Now that the classList Array has been implemented, we need to create methods to access the list items.
    5·1 answer
  • How to code 2.9.5: Four colored triangles {Code HS}
    10·1 answer
  • Write a method that will receive 2 numbers as parameters and will return a string containing the pattern based on those two numb
    10·1 answer
  • Write a program that uses the Purchase class in 5.13. Set the prices to the following: Oranges: 10 for $2.99 Eggs: 12 for $1.69
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!