Details of this Paper

The purpose of this homework is for you to apply your knowledge

Description

solution


Question

Question;Instructions The purpose of this homework is for you to apply your knowledge of Java to create a simple Java program that implements two different APIs.Develop a simple Java program that implements two different APIs:1. (Use the Random class) Create a Random object with seed 1000 and display the first 50 random integers between 0 and 100 using the nextInt(100) method.2. (Use the GregorianCalendar class) Java API has the GregorianCalendar class in the java.util package, which you can use to obtain the year, month, and day of a date. The no-arg constructor constructs an instance for the current date, and the methods get(GregorianCalendar.YEAR), get(GregorianCalendar.MONTH), and get(GregorianCalendar.DAY_OF_MONTH) return the year, month, and day. Perform two tasks:a. Display the current year, month, and day.b. The GregorianCalendar class has the setTimeInMillis(long), which can be used to set a specified elapsed time since January 1, 1970. Set the value to 1234567898765L and display the year, month, and day.Deliverables:Java source code file(s).Java source code must compile. Uncompiled source code will incur an automatic 10 point deduction in grade.Java source code must follow object-oriented principles of inheritance, encapsulation, and polymorphism. Examples: all data variables of the class are private, constructors, methods, and class names are public, proper syntax for inheritance or interface, etc.Java source code must contain a comprehensive commented documentation section that contains the Approach, Lessons Learned, Test Plan, and Possible Improvement sub-sections with at least 4 bullet points each.For modularity, you only can have one class or interface per Java file maximum.Develop a simple Java program that implements two different APIs:1. (Use the Random class) Create a Random object with seed 1000 and display the first 50 random integers between 0 and 100 using the nextInt(100) method.2. (Use the GregorianCalendar class) Java API has the GregorianCalendar class in the java.util package, which you can use to obtain the year, month, and day of a date. The no-arg constructor constructs an instance for the current date, and the methods get(GregorianCalendar.YEAR), get(GregorianCalendar.MONTH), and get(GregorianCalendar.DAY_OF_MONTH) return the year, month, and day. Perform two tasks:a. Display the current year, month, and day.b. The GregorianCalendar class has the setTimeInMillis(long), which can be used to set a specified elapsed time since January 1, 1970. Set the value to 1234567898765L and display the year, month, and day.DeliverablesJava source code file(s).Java source code must compile. Uncompiled source code will incur an automatic 10 point deduction in grade.Java source code must follow object-oriented principles of inheritance, encapsulation, and polymorphism. Examples: all data variables of the class are private, constructors, methods, and class names are public, proper syntax for inheritance or interface, etc.Java source code must contain a comprehensive commented documentation section that contains the Approach, Lessons Learned, Test Plan, and Possible Improvement sub-sections with at least 4 bullet points each.For modularity, you only can have one class or interface per Java file maximum.Lateness penalties: 10 points deducted for each late day of submission.

 

Paper#36489 | Written in 18-Jul-2015

Price : $36
SiteLock