Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

table [ [ , Su , M , T , W , Th , F , Sa ] , [ Employee 0 , 2

\table[[,Su,M,T,W,Th,F,Sa],[Employee 0,2,4,3,4,5,8,8],[Employee 1,7,3,4,3,3,4,4],[Employee 2,3,3,4,3,3,2,2],[Employee 3,9,3,4,7,3,4,1]]Tasks
Topic 1: Java Basics (20%)
(5%)(Palindrome checker) Implement the following method headers with the required functions:
public static int reverse(int number)// Return the reversal of an integer, e.g., reverse(123) returns 321
public static boolean isPalindrome(int number)// Return true if number is a palindrome
Use the reverse method to implement isPalindrome because a number is a palindrome if its reversal is the same
as itself. Note that in the reverse method you must convert the integer number to a String first for reversal and then
convert it back to an integer number (other non-string ways are not acceptable). Write a test main program that
prompts the user to enter several integers ending with a number 0(denotes the end of console user input) and
reports whether those integers are palindrome or not.
Here is a sample run:
Enter integers for palindrome testing: 1221123211235210
true true false
(5%)(Star Employees and Busiest Days) The weekly casual work hours for all 4 employees are stored in a
two-dimensional array (4 rows x7 columns) as shown below. Each row records a corresponding employee's 7-
day work hours. Write a program to work out and display the star employees who work the most hours across
a week (there can be more than one star employee to display) and similarly the busiest days (also can be more
than one) that need the most total employment/work hours from all employees. For instance, in the following,
Employee 0 is the star employee who works 34 hours in a week and Sunday is the busiest day that requires 4
employees to work at a total of 21 hours.
java program
image text in transcribed

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

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions

Question

=+ Does it speak to you in a personal way? Does it solve a problem?

Answered: 1 week ago

Question

=+Part 4 Write one unifying slogan that could work here and abroad.

Answered: 1 week ago