Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code the working java application based on the given situational requirements. IMAGE TRANSCRIPT: Create a class named AA1_Section_FebLove_Lastname that has the following features: Accepts love

Code the working java application based on the given situational requirements.
image text in transcribed
image text in transcribed
IMAGE TRANSCRIPT:

Create a class named AA1_Section_FebLove_Lastname that has the following features:

  • Accepts love expressions (sentences) and displays the following messages after counting the number of sentences in the said letter (Hint: count the number of periods to count the number of sentences in the letter). Assume that the love sentences will always be terminated with a period.
  • 1 to 2 sentences: "Friend Zone SECTION" o 3 to 4 sentences: "Romantic SECTION" o 5 or more sentences: "Old Soul SECTION"
  • Call the Section Lastname class.
  • From the AA1_Section_FebLove_Lastname class, call another class named Section_Lastname that has the following features:
  • Accept and count the number of characters in the boy's name: (i.e. Jamiel)
  • Accept and count the number of characters in the girl's name: (i.e. Jameela)
  • Display the total number of characters of both the names of the boy and the girl _ Jamiel + Jameela is 6 characters + 7 characters = 13 characters
  • Count the similar letters that can be found in both the names of the boy and the girl (disregard capital or UPPERCASE letters)
  • Jamiel (j=1, a=1, m=1, i=0, e=1, 1=1, Total=5)
  • Jameela (J=1, a=2, m=1, e=2, l=1, Total=7)
  • Total Similar Characters: 12
  • Compute the love percentage of the boy: "Total similar characters of the boy's name divided by total number of characters of both the names of the boy and the girl. Then get the percentage. (5/13 = 38% love percentage of boy)

o Compute the love percentage of the girl:

  • Total similar characters of the girl's name divided by total number of characters of both the names of the boy and the girl. Then get the percentage. (7/13 = 54% love percentage of girl)
  • Compute the love percentage if considered as a couple or combined: Total similar characters of the names of the boy and the girl divided by total number of characters of both the names of the boy and the girl. Then get the percentage. (12/13 = 92% love percentage as a couple)

Sample Run:

Type in your love expressions:

You may think I am a sentimental fool to write you this letter. Happy Valentine's Day to a very special friend. To me, it's a day when we express how much we appreciate all the special people in our lives.

Total number of sentences: 3

Romantic

__________________________

Welcome to Love Percentage

__________________________

Enter boy's name: Jamiel

Enter girl's name: Jameela

Total the number of characters of the boy's name: 6

Total the number of characters of the girl's name: 7

Total number of characters of the names of the boy and the girl: 13

Similar letters found in both the names of the boy and the girl:

Boy: Jamiel

j=1

a=1

m=1

=0

e=1

1=1

Total=5

Girl: Jameela

i=1

a=2

m=1

e=2

1=1

Total = 7

Total Similar Characters: 12

Love Percentage of Boy:

5/13 = 38% love percentage of boy

Love Percentage of Girl:

7/13 = 54% love percentage of girl

Love Percentage as a couple:

12/13 = 92% love percentage of as a couple

Note: Percentages may be more than 2 decimal places or a whole number as shown in the example.

However, make sure that floating point numbers (float or double is used as data type in the computations.

Create a class named AA1_Section_FebLove_Lastname that has the following features: - Accepts love expressions (sentences) and displays the following messages after counting the number of sentences in the said letter (Hint: count the number of periods to count the number of sentences in the letter). Assume that the love sentences will always be terminated with a period. 1 to 2 sentences: "Friend Zone SECTION" 3 to 4 sentences: "Romantic SECTION" 5 or more sentences: "Old Soul SECTION" - Call the Section_Lastname class. - From the AA1_Section_FebLove_Lastname class, call another class named Section_Lastname that has the following features: Accept and count the number of characters in the boy's name: (i.e. Jamiel) Accept and count the number of characters in the giri's name: fi.e. Jameela) Display the total number of characters of both the names of the boy and the girl - Jamiel + Jameela is 6 characters +7 characters =13 characters Count the similar letters that can be found in both the names of the boy and the girl (disregard capital or UPPERCASE letters) - Jamiel (j=1, a=1,m=1,i=0,e=1,l=1, Total=5) - Jameela (j=1,a=2,m=1,e=2,1=1, Totalm7) - Total Similar Characters: 12 Compute the love percentage of the boy: - Total similar characters of the boy's name divided by total number of characters of both the names of the boy and the girl. Then get the percentage. [5/13=38% love percentage of boy ] Compute the love percentage of the girl: - Total similar characters of the girl's name divided by total number of characters of both the names of the boy and the girl. Then get the percentage. (7/13=54% love percentage of girl) Compute the love percentage if considered as a couple or combined: - Total similar characters of the names of the boy and the girl divided by total number of characters of both the names of the boy and the girl. Then get the percentage. (12/13=92% love percentage as a couple) Sample Run: Type in your love expressions: You may thnk 1 am a sentimental fool to write you this letter. Happy Valentine's Day to a very special friend. To me, it's a day when we express how moch we appreciate all the special people in our lives. Total number of sentences: 3 Romantic Welcome to Lave Percentage Enter boy's name: Jamiel Enter girl's name: Jameela Total the number of characters of the boy's name: 6 Total the number of characters of the girl's name: 7 Total number of characters of the names of the boy and the girl: 13 Similar letters found in both the names of the boy and the girl: Boy lamiel j=1 j=1 m=1 j=0 j=1 j=1 Totale5 Girt: jameela j=1 a=2 m=1 en2 I=1 Total=7 Total Similar Characters: 12 Love Percentage of Boy: 5/13=38%lovepercentageofboy Lave Percentage of Gir: 7/13=54% love percentage of girl Lave Percentage as a couple: 12/13=92% love percentage of as a couple Note: Percentages may be more than 2 decimal places or a whole number as shown in the example. However, make sure that floating point numbers (float or double) is used as data type in the computations

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2022 Grenoble France September 19 23 2022 Proceedings Part 4 Lnai 13716

Authors: Massih-Reza Amini ,Stephane Canu ,Asja Fischer ,Tias Guns ,Petra Kralj Novak ,Grigorios Tsoumakas

1st Edition

3031264118, 978-3031264115

More Books

Students also viewed these Databases questions

Question

Discuss the importance of workforce planning.

Answered: 1 week ago

Question

Differentiate between a mission statement and a vision statement.

Answered: 1 week ago