Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION ONE: Multiplication Table (3 points) Write a program in java to display on the screen a multiplication table from 1 to n; where n

image text in transcribed
image text in transcribed
image text in transcribed
QUESTION ONE: Multiplication Table (3 points) Write a program in java to display on the screen a multiplication table from 1 to n; where n is an integer entered by the user. The main diagonal of the table must be filled with the character **. For example, if the user enters 7, your program should display: Enter the value of n: 7 1 3 4 1 N 6 7 1 1 1 1 2 NH 3 6 * 7 14 21 * 11 21 31 41 51 6 71 6 12 18 24 30 2 3 4 5 6 7 7 * 6 8 10 12 14 4 5 10 12 15 20 20 24 30 28 35 28 12 15 18 21 35 42 * 42 QUESTION TWO: Time Algorithm (2 points) Write a program in java that outputs and prints the number of hours, minutes, and seconds that corresponds to 50391 total seconds. The output should be 13 hours, 59 minutes, and 51 seconds. Solve the problem using arithmetic operators only QUESTION THREE: Password Checker (5 points) Write a program in java that incorporates an algorithm with a function that will check whether or not a string is in a valid password format with the following rules: A password must have at least ten characters. A password consists of only letters, digits and symbol(s). A password must contain at least two digits. A password must contain at least one uppercase letter A password must contain at least one special symbol Your program should continue to prompt the user until he/she enters a valid password. QUESTION FOUR: Common Substring Algorithm (10 points) Write a program in javal that will find the longest common substring from a series of two to many words given to you by the user. For example, your program will ask the user how many words he/she wants to compare, with two being the minimum input. The longest common substring of the strings "QWERTY", "TEWERU", "YWERQT" is WER. Your algorithm should work for any number of inputs (words), if there is no match of common substrings, indicate to the user with a message. A common algorithm to follow when making this program is first to prompt the user for how many words he/she wants to compare (check for valid input of a number 2 to 'n') and then prompt the user for the strings (words) and following this return the common substring if one is present. QUESTION FIVE: String Permutation (5 points) w QUESTION SIX: Modified Fibonacci Recursion (10 points) Using recursion, write a program in java that takes an input 'n' (a number) from a user to calculate and print out the Fibonacci using the following modified definition: F(N) = 1 = F((n+1)/2) + F((n-1/2) = F(n/2 + 1)2 - F(n/2-1)2 if n=1 or n=2 if n is odd if n is even Your solution must implement recursion to receive points for this

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

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions

Question

6. Vanguard

Answered: 1 week ago

Question

1. PricewaterhouseCoopers

Answered: 1 week ago