Comp 274 Week 1

In: English and Literature

Submitted By alexmicane
Words 796
Pages 4
HELPIDO.COM

------------------------------------------------------------------------------------
Follow this link of get the tutorial

http://helpido.com/java-comp-274-week-1-programming-assignment-write-a-java-application-which-tests-the-random-number-generation-abilities-of-java/
------------------------------------------------------------------------------------

COMP/274 - Week 1 Programming Assignment
________________________________________

Week 1 Programming Assignment Do the following two programs: 1. Write a Java application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers. Use a Scanner object to get the input from the user. Use System.out to output the results. The average should be a floating point result, and should be displayed with 2 digits after the decimal point. 1. Write a Java application which tests the random number generation abilities of Java. Random number generation is explained below.Your application should simulate rolling a pair of dice some number of times. Use a JOptionPane to ask the user how many times the dice should be rolled. Each dice roll can be a value between 1 and 6, so rolling 2 dice will result in values between 2 and 12. You need to generate a random number between 1 and 6 to simulate rolling each dice. Keep track of the result of each roll using an array that is indexed by the sum of the roll of the two dice. Output your result in a table which shows each value (ie. 2 – 12) and the number of times that value was rolled. The program must have the following structure:
1. The main function declares the counting array and gathers input from the user.
2. A separate function is called which takes an integer array parameter as well as the number of dice rolls to execute. This function rolls the dice the required number of times…...

Similar Documents

Comp 274 Week 1

...http://helpido.com/java-comp-274-week-1-programming-assignment-write-a-java-application-which-tests-the-random-number-generation-abilities-of-java/ ------------------------------------------------------------------------------------ COMP/274 - Week 1 Programming Assignment ________________________________________ Week 1 Programming Assignment Do the following two programs: 1. Write a Java application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers. Use a Scanner object to get the input from the user. Use System.out to output the results. The average should be a floating point result, and should be displayed with 2 digits after the decimal point. 1. Write a Java application which tests the random number generation abilities of Java. Random number generation is explained below.Your application should simulate rolling a pair of dice some number of times. Use a JOptionPane to ask the user how many times the dice should be rolled. Each dice roll can be a value between 1 and 6, so rolling 2 dice will result in values between 2 and 12. You need to generate a random number between 1 and 6 to simulate rolling each dice. Keep track of the result of each roll using an array that is indexed by the sum of the roll of the two dice. Output your result in a table which shows each value (ie. 2 – 12) and the number of times that value was rolled. The program must have the following......

Words: 792 - Pages: 4

Comp 274 Week 1

...http://helpido.com/java-comp-274-week-1-programming-assignment-write-a-java-application-which-tests-the-random-number-generation-abilities-of-java/ ------------------------------------------------------------------ COMP/274 - Week 1 Programming Assignment ________________________________________ Week 1 Programming Assignment Do the following two programs: 1. Write a Java application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers. Use a Scanner object to get the input from the user. Use System.out to output the results. The average should be a floating point result, and should be displayed with 2 digits after the decimal point. 1. Write a Java application which tests the random number generation abilities of Java. Random number generation is explained below.Your application should simulate rolling a pair of dice some number of times. Use a JOptionPane to ask the user how many times the dice should be rolled. Each dice roll can be a value between 1 and 6, so rolling 2 dice will result in values between 2 and 12. You need to generate a random number between 1 and 6 to simulate rolling each dice. Keep track of the result of each roll using an array that is indexed by the sum of the roll of the two dice. Output your result in a table which shows each value (ie. 2 – 12) and the number of times that value was rolled. The program must have the following structure: 1. The main......

Words: 796 - Pages: 4

Comp/274 - Week 1 Programming Assignment

...http://helpido.com/java-comp-274-week-1-programming-assignment-write-a-java-application-which-tests-the-random-number-generation-abilities-of-java/ ------------------------------------------------------------------------------------ COMP/274 - Week 1 Programming Assignment ________________________________________ Week 1 Programming Assignment Do the following two programs: 1. Write a Java application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers. Use a Scanner object to get the input from the user. Use System.out to output the results. The average should be a floating point result, and should be displayed with 2 digits after the decimal point. 1. Write a Java application which tests the random number generation abilities of Java. Random number generation is explained below.Your application should simulate rolling a pair of dice some number of times. Use a JOptionPane to ask the user how many times the dice should be rolled. Each dice roll can be a value between 1 and 6, so rolling 2 dice will result in values between 2 and 12. You need to generate a random number between 1 and 6 to simulate rolling each dice. Keep track of the result of each roll using an array that is indexed by the sum of the roll of the two dice. Output your result in a table which shows each value (ie. 2 – 12) and the number of times that value was rolled. The program must have the following structure: 1. The......

Words: 796 - Pages: 4

Comp/274 - Week 1 Programming Assignment

...http://helpido.com/java-comp-274-week-1-programming-assignment-write-a-java-application-which-tests-the-random-number-generation-abilities-of-java/ ------------------------------------------------------------------------------------ COMP/274 - Week 1 Programming Assignment ________________________________________ Week 1 Programming Assignment Do the following two programs: 1. Write a Java application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers. Use a Scanner object to get the input from the user. Use System.out to output the results. The average should be a floating point result, and should be displayed with 2 digits after the decimal point. 1. Write a Java application which tests the random number generation abilities of Java. Random number generation is explained below.Your application should simulate rolling a pair of dice some number of times. Use a JOptionPane to ask the user how many times the dice should be rolled. Each dice roll can be a value between 1 and 6, so rolling 2 dice will result in values between 2 and 12. You need to generate a random number between 1 and 6 to simulate rolling each dice. Keep track of the result of each roll using an array that is indexed by the sum of the roll of the two dice. Output your result in a table which shows each value (ie. 2 – 12) and the number of times that value was rolled. The program must have the following structure: 1. The......

Words: 796 - Pages: 4

Comp/274 - Week 1 Programming Assignment

...http://helpido.com/java-comp-274-week-1-programming-assignment-write-a-java-application-which-tests-the-random-number-generation-abilities-of-java/ ------------------------------------------------------------------------------------ COMP/274 - Week 1 Programming Assignment ________________________________________ Week 1 Programming Assignment Do the following two programs: 1. Write a Java application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers. Use a Scanner object to get the input from the user. Use System.out to output the results. The average should be a floating point result, and should be displayed with 2 digits after the decimal point. 1. Write a Java application which tests the random number generation abilities of Java. Random number generation is explained below.Your application should simulate rolling a pair of dice some number of times. Use a JOptionPane to ask the user how many times the dice should be rolled. Each dice roll can be a value between 1 and 6, so rolling 2 dice will result in values between 2 and 12. You need to generate a random number between 1 and 6 to simulate rolling each dice. Keep track of the result of each roll using an array that is indexed by the sum of the roll of the two dice. Output your result in a table which shows each value (ie. 2 – 12) and the number of times that value was rolled. The program must have the following structure: 1. The......

Words: 796 - Pages: 4

Comp/274 - Week 1 Programming Assignment

...http://helpido.com/java-comp-274-week-1-programming-assignment-write-a-java-application-which-tests-the-random-number-generation-abilities-of-java/ ------------------------------------------------------------------------------------ COMP/274 - Week 1 Programming Assignment ________________________________________ Week 1 Programming Assignment Do the following two programs: 1. Write a Java application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers. Use a Scanner object to get the input from the user. Use System.out to output the results. The average should be a floating point result, and should be displayed with 2 digits after the decimal point. 1. Write a Java application which tests the random number generation abilities of Java. Random number generation is explained below.Your application should simulate rolling a pair of dice some number of times. Use a JOptionPane to ask the user how many times the dice should be rolled. Each dice roll can be a value between 1 and 6, so rolling 2 dice will result in values between 2 and 12. You need to generate a random number between 1 and 6 to simulate rolling each dice. Keep track of the result of each roll using an array that is indexed by the sum of the roll of the two dice. Output your result in a table which shows each value (ie. 2 – 12) and the number of times that value was rolled. The program must have the following structure: 1. The......

Words: 796 - Pages: 4

Comp274 Comp/274 Comp 274 Week 4

...HELPIDO.COM ------------------------------------------------------- Follow this link to get the tutorial http://helpido.com/comp-274-week-4-3/ ------------------------------------------------------- COMP 274 - Week 4 Programming Assignment ________________________________________ Write a Java GUI application to allow you to experiment with colors and fonts. The general appearance of you GUI should be something similar to the following: Your program must meet the following requirements: 1. Do not use any of the GUI editing capabilities of Eclipse for this assignment. Do all the GUI layout work based on what you have learned in class in the last 2 weeks. 2. You can use either inheritance or composition to get a JFrame into your application. 3. All member variables must be private. 4. The GUI and event handling setup must be done in the constructor of your GUI class or in privatemethods called from the constructor. Hint: it would seem logical to have a private method to build the top, left, and bottom panels. 5. The main text field (the red one above) will be used to show the results from the selection of font size, bold and italic selection, and foreground and background color selection. 6. The display must have a label and JTextField where the user inputs a font size value and which must appear in the upper part of the frame as shown above. 7. There must also be 2 check boxes that will control whether the font has......

Words: 801 - Pages: 4

Comp 274 Comp274 Comp/274 Week 6

...the tutorial http://helpido.com/comp-274-week-6-2/ ------------------------------------------------------ COMP 274 COMP274 COMP/274 Week 6 Programming Assignment ________________________________________ The Driving Academy Program The purpose of this lab is to give you a chance to use some of the data stream tools we have been discussing in a simple application. The assignment is to write a driving academy application that allows a user to manipulate the records of students of a driving academy. Your program will present a GUI interface which allows the user to specify student id, student name, and instructor name. It also allows the user to record grades for the midterm, final, and driving test. It displays the current overall average grade for the student. It provides a place for instructor comments to be entered and displayed. Finally, it provides buttons that permit student records to be added, fetched, updated, and deleted. There is also a button to reset the fields of the GUI to their initial condition, and there is a place where the status of each requested operation is displayed. The GUI for this program is displayed below. You will be given the graphical user interface class for this assignment. Your job is to add the necessary event handling and data management classes to make this application work and meet the requirements as detailed below. You are NOT allowed to change the GUI. Required program elements: 1. Only the 5 buttons generate events. No...

Words: 1917 - Pages: 8

Comp 274 Comp274 Comp/274 - Week 7

...tutorial http://helpido.com/comp-274-week-7-3/ ----------------------------------------------------- COMP 274 COMP274 COMP/274 - Week 7 Programming Assignment ________________________________________ Documentation The objective of this part of the lab is to create documentation using Javadoc for the project from week 6. The following documentation requirements must be met. 1. All commentary must use standard JavaDoc comments and tags. 2. For every class add a class level comment including the author and the purpose of the class. 3. Where one class heavily depends on the use of an object from another class, provide a link to the other class using the @see tag. 4. For every method, add a method level comment which includes information on the purpose of the method, the method parameters, and the result returned by the method. 5. Use the javadoc command to generate HTML files for your project. 6. Use the browser to view your generated documentation to verify that all the required information for all the classes is included. Consult the document provided describing how to export JavaDoc comments from Eclipse. When your documentation is complete, turn in the following: 1. A Zip file of the directory which contains all the documentation pages. 2. A Word document containing all the source code you added JavaDoc comments to. Deployment Create a JAR file for the ScreenSaver project from week 5. The JAR file must......

Words: 321 - Pages: 2

Comp 274 Comp274 Comp/274 - Week 7

...tutorial http://helpido.com/comp-274-week-7-3/ ----------------------------------------------------- COMP 274 COMP274 COMP/274 - Week 7 Programming Assignment ________________________________________ Documentation The objective of this part of the lab is to create documentation using Javadoc for the project from week 6. The following documentation requirements must be met. 1. All commentary must use standard JavaDoc comments and tags. 2. For every class add a class level comment including the author and the purpose of the class. 3. Where one class heavily depends on the use of an object from another class, provide a link to the other class using the @see tag. 4. For every method, add a method level comment which includes information on the purpose of the method, the method parameters, and the result returned by the method. 5. Use the javadoc command to generate HTML files for your project. 6. Use the browser to view your generated documentation to verify that all the required information for all the classes is included. Consult the document provided describing how to export JavaDoc comments from Eclipse. When your documentation is complete, turn in the following: 1. A Zip file of the directory which contains all the documentation pages. 2. A Word document containing all the source code you added JavaDoc comments to. Deployment Create a JAR file for the ScreenSaver project from week 5. The JAR file must......

Words: 321 - Pages: 2

Comp 274 Comp274 Comp/274 Week 1 Programming Assignment

...Follow this link of get the tutorial http://helpido.com/comp-274-week-1-2/ ------------------------------------------------------------------------------------ COMP 274 COMP274 COMP/274 Week 1 Programming Assignment ________________________________________ Week 1 Programming Assignment Do the following two programs: 1. Write a Java application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers. Use a Scanner object to get the input from the user. Use System.out to output the results. The average should be a floating point result, and should be displayed with 2 digits after the decimal point. 1. Write a Java application which tests the random number generation abilities of Java. Random number generation is explained below.Your application should simulate rolling a pair of dice some number of times. Use a JOptionPane to ask the user how many times the dice should be rolled. Each dice roll can be a value between 1 and 6, so rolling 2 dice will result in values between 2 and 12. You need to generate a random number between 1 and 6 to simulate rolling each dice. Keep track of the result of each roll using an array that is indexed by the sum of the roll of the two dice. Output your result in a table which shows each value (ie. 2 – 12) and the number of times that value was rolled. The program must have the following structure: 1. The main function declares the counting array and......

Words: 769 - Pages: 4

Comp 274 Comp274 Comp/274 Week 1 Programming Assignment

...Follow this link of get the tutorial http://helpido.com/comp-274-week-1-2/ ------------------------------------------------------------------------------------ COMP 274 COMP274 COMP/274 Week 1 Programming Assignment ________________________________________ Week 1 Programming Assignment Do the following two programs: 1. Write a Java application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers. Use a Scanner object to get the input from the user. Use System.out to output the results. The average should be a floating point result, and should be displayed with 2 digits after the decimal point. 1. Write a Java application which tests the random number generation abilities of Java. Random number generation is explained below.Your application should simulate rolling a pair of dice some number of times. Use a JOptionPane to ask the user how many times the dice should be rolled. Each dice roll can be a value between 1 and 6, so rolling 2 dice will result in values between 2 and 12. You need to generate a random number between 1 and 6 to simulate rolling each dice. Keep track of the result of each roll using an array that is indexed by the sum of the roll of the two dice. Output your result in a table which shows each value (ie. 2 – 12) and the number of times that value was rolled. The program must have the following structure: 1. The main function declares the counting array and......

Words: 769 - Pages: 4

Comp 274 Comp274 Comp/274 Week 3

...HELPIDO.COM -------------------------------------------------- Follow this link to get the tutorial http://helpido.com/comp-274-week-3/ -------------------------------------------------- COMP 274 COMP274 COMP/274 Week 3 Programming Assignment ________________________________________ Week 3 Programming Assignment Create Java programs for the following two problems. 1. Write a Java application to display the following GUI. At this point you are only implementing the display. We are not ready to make the calculator actually do any calculations! This program has the following requirements: 1. The size of the calculator is 250 x 250 pixels. 2. The background and foreground color of the calculator buttons must alternate in a checker board pattern as shown above. You can choose any pair of colors for your foreground and background colors. 3. The buttons should have at least 5 pixels of space between them. 4. The text on the buttons should be SanSerif size 16 and be bold. 5. Your application should be implemented in a single class. The main method of the class does nothing more than create an object of the class. The constructor of the class creates and displays the GUI. The constructor may call other methods of the class if needed. 6. The class must inherit from JFrame as the following demonstrates: public myGUI extends JFrame { … } The extends keyword specifies inheritance. Inside the class you can directly access methods of the JFrame......

Words: 444 - Pages: 2

Comp274 Comp/274 Comp 274 Week 4

...HELPIDO.COM http://helpido.com/comp-274-week-4/ COMP274 COMP/274 COMP 274 WEEK 4 PROGRAMMING ASSIGNMENT ________________________________________ Write a Java GUI application to do temperature conversions between Celcius, Fahranheit, and Kelvin. The GUI display should look something like the following: Your program must meet the following requirements: 1. Do not use any of the GUI editing capabilities of Eclipse for this assignment. Do all the GUI layout work based on what you have learned in class in the last 2 weeks. 2. The GUI and event handling setup should be done in the constructor of your GUI class or in private methods called from the constructor. 3. The display must have a label and JTextField where the user inputs a value which must appear in the upperpart of the frame as shown above. 4. There should be a set of 3 radio buttons which indicate the input scale of the value to be converted. The 3 input scale buttons must be vertically aligned on the left side of the display as shown above. 5. There should be a set of 3 radio buttons which indicate the output scale to be converted to. The 3 output scale buttons must be vertically aligned and appear on the right side of the display as shown above. 6. Event handling must be setup so that selection of any input or output button causes an event which triggers the event handling code to determine which of 9 possible conversions is needed. 7. Event handling must also respond to the user hitting the......

Words: 523 - Pages: 3

Comp 274 Comp274 Comp/274 Week 7

...tutorial http://helpido.com/comp-274-week-7-3/ ----------------------------------------------------- COMP 274 COMP274 COMP/274 - Week 7 Programming Assignment ________________________________________ Documentation The objective of this part of the lab is to create documentation using Javadoc for the project from week 6. The following documentation requirements must be met. 1. All commentary must use standard JavaDoc comments and tags. 2. For every class add a class level comment including the author and the purpose of the class. 3. Where one class heavily depends on the use of an object from another class, provide a link to the other class using the @see tag. 4. For every method, add a method level comment which includes information on the purpose of the method, the method parameters, and the result returned by the method. 5. Use the javadoc command to generate HTML files for your project. 6. Use the browser to view your generated documentation to verify that all the required information for all the classes is included. Consult the document provided describing how to export JavaDoc comments from Eclipse. When your documentation is complete, turn in the following: 1. A Zip file of the directory which contains all the documentation pages. 2. A Word document containing all the source code you added JavaDoc comments to. Deployment Create a JAR file for the ScreenSaver project from week 5. The JAR file must......

Words: 321 - Pages: 2

Yoo Quiz On The Block | Ö.3 Ergänzungsmarken aus 2002/03 gezähnt+ungezähnt pf**siehe Bild | 毒液:致命守护者 Venom 2018 HD720P AAC x264 English CHS-ENG BTDX8