Java project

Assignment Help JAVA Programming
Reference no: EM131140

Write a class named Java1306CMIS141C801 that performs the following actions.

Prompt the user for an int between lower and upper boundary. Reuse the validateInput() method from project 2 to validate if the input is in bounds. If it is not, print an error that the given input is not greater than the lower bound and not less than the upper bound, then end the program.

If input is in bounds, prepare an array of type String of that length. Loop the length of the array. For each array element, make a random number from 0 to 9. Reuse the convertInput() method from project 2 and put into each array element the String value that corresponds to the random number.

Create a second loop that prints the contents of the array as array index followed by the array index contents. Use the escape character for the tab stop to line up the output.

Your upper and lower boundaries could be constants. Use 1 as lower and 20 as upper boundaries.

Your deliverables:

Java1306CMIS141C801Project3.java

Screen shot of your program, demonstrating both a failure case and a successful run.

Here is a sample run. Your output could be similar to this. Obviously, the random numbers will be different for every run.

Volume in drive C is OS

Volume Serial Number is A426-EE6D

Directory of C:\Users\andy\java\141\p3

12/26/2013 12:37 PM <DIR> .

12/26/2013 12:37 PM <DIR> ..

12/26/2013 12:37 PM 2,242 Java1302CMIS141C801Project.class

12/26/2013 12:37 PM 1,753 Java1302CMIS141C801Project.java

2 File(s) 3,995 bytes

2 Dir(s) 118,631,022,592 bytes free

Enter size of the array, between 1 and 20. -3

Invalid input. -3 is not >= 1 and <= 20.

Enter size of the array, between 1 and 20. 2332

Invalid input. 2332 is not >= 1 and <= 20.

Enter size of the array, between 1 and 20. 5

The contents of the 5 element array:

0. zero

1. zero

2. six

3. three

4. two

End of array contents.

Enter size of the array, between 1 and 20. 5

The contents of the 5 element array:

0. one

1. nine

2. one

3. one

4. seven

End of array contents.

Reference no: EM131140

Questions Cloud

Advanced stress analysis assignment : Advanced Stress Analysis Assignment
Compilation and Execution - JAVA problem : Style marks are based on how your submitted code looks. Remember that good code is easily readable (and understandable) by someone who did not write it. For assignments, you should also include your name, student number, what course this is, what ass..
Time conversion : Write a C++ program that takes an Eastern standard time in hours, minutes, and seconds,and prints it out in Central time, Mountain time, or Pacific time.
Cwsi project : Project Template for CWSI Project
Java project : Prompt the user for an int between lower and upper boundary.
Case study and research paper : Google Case and Chipotle Case
Demand supply and market equilibrium : Exchange and markets, Demand supply and market equilibrium
Management accounting - ehsan electronics company : A new plant accountant suggested that the company may be able to assign support costs to products more accurately by using an activity based costing system that relies on a separate rate for each manufacturing activity that causes support costs.
Was the parking lot a bailee of the property : Briefly distinguish among abandoned property, lost property, and mislaid property. Include in your discussion the status of the person who finds the property in each of these situations.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd