Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, I would like a JAVA program following these code. I need to do similar to a dating app but only with numbers, assuming NPEOPLE

Hello, I would like a JAVA program following these code. I need to do similar to a dating app but only with numbers, assuming NPEOPLE is int. Then I need to se in screen something like this. For Example compatible [10] = 25 meaning that the person #10 like person #25 but not necessary the other way.

 


1. /* Check all people */
2. int i,j;
3. for(i=0; i4. /* Initialize the array of frequencies */
5. freq[i]=0;
6. /* Check all people */
7. for(j=0; j8. /* If the person is compatible with other,
9. increase the frequency */
10. if( i==compatible[j])
11. freq[i]++;
12. }
13. /* Initialize the maximum frequency */
14. max=0;
15. /* Check all people */
16. for(i=0; i17. /* If the frequency is higher than the maximum,
18. save as maximum */
19. if(freq[i]>max)
20. max=freq[i];
21. }
22. /* Print the result */
23. printf("The person with more affinity is:
%d",compatible[max]);

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Certainly Below is a Java program that implements the functionality you described This program calcu... 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_2

Step: 3

blur-text-image_3

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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions

Question

25.0 m C B A 52.0 m 65.0 m

Answered: 1 week ago

Question

The expected return is %. (Round to two decimal places.)

Answered: 1 week ago