You are on page 1of 9

H E A V E N ’ S L I G H T I S O U R G U I D E

Rajshahi University of Engineering & Technology

Assignment
COURSE NO: MTE 4181
Software Engineering

Solve 5 program problems using Java.

Submitted By:
Jalal Uddin
ID: 1608009
Experiment Name:
Solve 5 program problems using Java.

Problem 1:
Write a java program to add two matrix.

Code:

Output:
Problem 2:
Write a java program to print n numbers (take a number n input from keyboard) in ascending and
descending order (using class and object).
Output:
Problem 3:
Write a java program which has three classes named person, teacher, student and the person class is
inherited by both teacher and student classes.

Code:

Output:
Problem 4:
Write a java program which takes a string and checks weather it is palindrome or not.

Code:

Output:
Problem 5:
Write a java menu program to

1. Addition
2. Subtraction
3. Multiplication
4. Division
5. 0. Exit.

(Using switch statement)

Code:
Output:
Conclusions:
The problems were solved using Java programming language. As IDE, Netbeans IDE was used to
perform this assignment task. The output window font size were too small in this IDE according to
the display resolution, hence the screenshots of the output had to be rescaled.

You might also like