2023 Please note This is only a word document with the code and screen shots Please re code in your own program | Assignment Collections

Computer Science 2023 CIS355A Lab 2 in Java

2023 Please note This is only a word document with the code and screen shots Please re code in your own program | Assignment Collections

Please note: This is only a word document with the code and screen shots. Please re-code in your own program.

STEP 1: Largest (10 points)

Write a Java application program called Largest.java that inputs a series of 10 single-digit numbers and determines and prints the largest of the numbers. Except main() method, no other user-defined method is required. Your program should use at least the following three variables

  1. counter: A counter to count to 10 (that is, to keep track of how many numbers have been input and to determine when all 10 numbers have been processed);
  2. number: The current digit input to the program; and 
  3. largest: The largest number found so far.

When each number is entered, make sure it is a single digit number, that is 0 to 9.

Grading Rubric

Largest

Points

Description

Standard header included

1

Must contain program’s name, student name, and description of the program

Program compiles

2

Program does not have any error

Program executes

2

Program runs without any error

Only single digit numbers are entered

2

Program validates number entered is a single digit number

Program displays the largest number

3

Program displays the largest number after all 10 numbers are entered

Subtotal

10

 

 

STEP 2: Palindrome (15 points)

A palindrome is a sequence of characters that reads the same backward as forward. For example, each of the following five-digit integers is a palindrome: 12321, 55555, 45554, and 11611. Write an application called Palindrome.java that asks the user to enter in a five-digit integer and determines whether it is a palindrome. If the number is not five digits long, display an error message dialog indicating the problem to the user. When the user dismisses the error dialog, allow the user to enter a new value.

Your program will have the following four methods

  1. main() method, which controls the execution of the program;
  2. retrieveInput() method, which prompts and retrieves the input values;
  3. check() method, which determines whether it is a palindrome; and
  4. display() method, which displays the result.

Grading Rubric

Palindrome

Points

Description

Standard header included

1

Must contain program’s name, student name, and description of the program

Program compiles

1

Program does not have any error

Program executes

1

Program runs without any error

Program contains main method

1

Program contains main method

Program contains retrieveInput() method

2

retrieveInput method exists, retrieves the user input, and checks if input is numeric and has five digits

Program contains check() method

2

check method exists and checks if number entered is a palindrome

Program contains display() method

2

display method exists and displays the result if palindrome or not

Value entered is numeric and has 5 digits

2

Program validates input to make sure it is numeric and has five digits

Correct output is displayed

3

Program displays the correct message for the number entered

Subtotal

15

 

 

STEP 3: Diamond (15 points)

Write a program called Diamond.java that uses a method diamondOfAsterisks() that displays a diamond (the row number of a diamond must be odd) of asterisks whose row is specified in an integer parameter row. For example, if the user enters a 7, then the diamond will have seven rows and the method will display the pattern of asterisks. Below is an example of the diamond displayed when 7 is entered.

   *
  ***
 *****
*******
 *****
  ***
   *

Grading Rubric

Diamond

Points

Description

Standard header included

1

Must contain program’s name, student name, and description of the program

Program compiles

1

Program does not have any error

Program executes

1

Program runs without any error

Program contains main method

2

Program contains the main method where user is asked to enter an odd number

Program contains diamondOfAsterisks() method

3

Program contains the diamondOfAsterisks method. This method contains the code that builds and displays the diamond based on the odd number entered.

Program asks for user input

2

User must enter an odd number

Program displays correct diamond

5

The diamond must have the number of rows entered by the user

Subtotal

15

 

 

 

 

We give our students 100% satisfaction with their assignments, which is one of the most important reasons students prefer us to other helpers. Our professional group and planners have more than ten years of rich experience. The only reason is that we have successfully helped more than 100000 students with their assignments on our inception days. Our expert group has more than 2200 professionals in different topics, and that is not all; we get more than 300 jobs every day more than 90% of the assignment get the conversion for payment.

Place Order Now

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational