CSC 212 Project: Java Program for Matrix Operations and Calculations

Verified

Added on  2019/09/22

|7
|314
|84
Project
AI Summary
This Java project involves creating a GUI-based program for matrix operations. The program generates a 15x15 matrix with random numbers, then calculates and displays the sum, minimum, maximum, and average of each row and column. The solution includes two classes, one for the program interface and another for matrix operations. The project requires the implementation of two menus for file operations and matrix-related functions. Bonus points are awarded for changing font, size, color, and style of the text displayed. The solution includes the necessary Java files and an executable JAR file to demonstrate the functionality of the program. This solution is helpful for students to understand and implement the matrix operations using Java.
Document Page
CSC 212 Programming 200 points
Project 2
Develop a menu-based GUI program to generate a matrix of 15 X 15 of integers
between 10 and 99 using the random number generator in the Math class. Use the
following formula:
(int) ( 10 + 90*Math.random())
Display the original matrix in a grid around the matrix.
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Calculate and display:
Sum of each row and column
Minimum of each row and column
Maximum of each row and column
Average of each row and column
Alongside of the matrix
Document Page
Document Page
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
You need at least two classes, one for the program interface (Project02) and another for
Matrix operations. Create two menus to handle program operations:
File:
About
Exit
Document Page
Matrix Operations:
Generate Array
Display Array
Display Statistics
o Sum
o Minimum
o Maximum
o Average
BONUS (50 points): Change font, make it bold, and change size to 12,
change font color for titles to red (check the next page for instructions)
Submit:
Java files and the executable jar file zipped into a file labeled as “your last name-”
through Black Board and email it to seyedt1@southernct.edu with subject line that
reads as “CSC 212 – Project02 – Your last name. You are responsible for getting the
right files to me.
Document Page
How to change font and drawing color
Changing font:
// define font (font name, font property, font size)
Font f = new Font(Font.SANS_SERIF,Font.BOLD,18);
g.setFont(f);
see https://docs.oracle.com/javase/7/docs/api/java/awt/Font.html for complete
description of java fonts
Changing color:
// use the setColor method in Graphics class, argument is a Color class
variable/constant
g.setColor(Color.red);
see https://docs.oracle.com/javase/7/docs/api/java/awt/Color.html for complete
description of the Color class
chevron_up_icon
1 out of 7
circle_padding
hide_on_mobile
zoom_out_icon