Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You must keep the class name requested in each question. You must hold the naming conventions requested in this document and each question. All deliverables

You must keep the class name requested in each question.
You must hold the naming conventions requested in this document
and each question.
All deliverables are defined at the end of this document. You must
upload them as requested.
1)(Class Name: Palindrome, Java File Name: Palindrome.java)
Write a program that prompts the user to enter an integer and determines whether it
is a palindrome integer. An integer is a palindrome if it reads the same from right to
left and from left to right. A negative integer is treated the same as a positive integer.
To have an efficient implementation, you are not allowed to convert numbers to
Strings. You must use numerical operators (*,/,+,-,%) to implement this code.
Here are a few sample runs of this program: [25 Points]
Enter an integer: 123
123 is not a palindrome
Enter an integer: -123
-123 is not a palindrome
Enter an integer: 121
121 is a palindrome
Enter an integer: -121
-121 is a palindrome
Enter an integer: 123321
123321 is a palindrome
Enter an integer: -123721
-123721 is not a palindrome
2)(Class Name: SmallestFactors, Java File Name: SmallestFactors.java)
Write a program that reads a positive integer and displays all its smallest factors in
decreasing order. For example, if the input integer is 120, the output should be as
follows: 5,3,2,2,2.
To have an efficient implementation, No Data Structure (e.g. Array, ArrayList,
Arrays, etc.) is allowed to be used.
Here is a sample run: [25 Points]
Enter a positive integer: 120
5,3,2,2,2
3)(Class Name: MySorting, Java File Name: MySorting.java)
Write a method with the following header to display three numbers in increasing
order:
public static void displaySortedNumbers(double num1, double num2, double num3)
In the main method, write a testing code that prompts the user to enter three numbers
and invokes the method to display them in increasing order. [25 Points]
No Off-the-shelf function (e.g. Arrays.sort(), etc.) is allowed to be used.
4)(Class Name: Scores, Java File Name: Scores.java)
Write a program that reads student scores, gets the best score, and then assigns
grades based on the following scheme:
The grade is A if the score is >=10;
The grade is B if the score is >=20;
The grade is C if the score is >=30;
The grade is D if the score is >=40;
The grade is F otherwise.
The program prompts the user to enter the total number of students, then prompts
the user to enter all of the scores, and concludes by displaying the grades (You must
use Array in your program).
To have an efficient implementation, You can use built-in arrays you have learned
in the class, but you cannot use ArrayList or any other similar library.
Here is a sample run: [25 Points]
Enter the number of students: 4
Enter 4 scores: 40557058
Student 0 score is 40, and their grade is C
Student 1 score is 55, and their grade is B
Student 2 score is 70, and their grade is A
Student 3 score is 58, and their grade is B
Deliverables:
A) Create an up to 15-minute video (only ONE video for all the questions)
explaining your answers, upload it on YouTube, and submit the link of your
video on Blackboard.
See "How to make a video and upload it on YouTube?" under the "Course
Information" on Blackboard.
Your video must at least contain the following content:
a. Explaining the key components of your code and how they work.
b. Showing three different runs and outputs of your code for each
question.
Note: There is no mark if you just read your code. You must explain your
code, not read it.
Note: Please DO NOT upload the original video file on Blackboard.
B) You must upload all requested Java files (i.e."*.java") as they are.
There is NO mark of you submitting any compressed file (e.g. zip, RAR,
etc.)
There is NO mark of you submitting "*.class" files.

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

Real Time Database Systems Architecture And Techniques

Authors: Kam-Yiu Lam ,Tei-Wei Kuo

1st Edition

1475784023, 978-1475784022

More Books

Students also viewed these Databases questions

Question

What is an interface? What keyword is used to define one?

Answered: 1 week ago