Embed presentation
Download to read offline
![AssignmentDay2
AssignmentDay3
1. Write a program to display the multiplication table for the number entered by the user.
2. Write a menu driven program to perform following operations:
a. Cube of a number x.
b. Square Root of a number x.
c. Calculate exponential of e raise to x .
(take input from user)
AssignmentDay4
Session 5 Programming Assignment Questions
1. Write a Java program to check whether a given string starts with the contents of
another string.
Sample Output:
Red is favorite color. Starts with Red? True
Orange is also my favorite color. Starts with Red? False
2. Write a Java program to remove the duplicate elements of a given array and return
the new length of the array.
Sample Output:
Sample array: [20, 20, 30, 40, 50, 50, 50]
Original array length: 7
Array elements are: 20 20 30 40 50 50 50
The new length of the array is: 4
3. Hackerrank challenge: Java String Introduction
https://www.hackerrank.com/challenges/java-strings-introduction/problem](https://image.slidesharecdn.com/assignmentjavaworkshop-210920045506/85/Assignment-java-workshop-1-320.jpg)

The document contains programming assignments for multiple days including: 1) A program to display the multiplication table for a user-entered number. 2) A menu-driven program to calculate the cube, square root, and exponential of a user-entered number. 3) A program to check if a string starts with the contents of another string. 4) A program to remove duplicate elements from an array and return the new length. It also provides a link to a Hackerrank challenge on Java strings introduction.
![AssignmentDay2
AssignmentDay3
1. Write a program to display the multiplication table for the number entered by the user.
2. Write a menu driven program to perform following operations:
a. Cube of a number x.
b. Square Root of a number x.
c. Calculate exponential of e raise to x .
(take input from user)
AssignmentDay4
Session 5 Programming Assignment Questions
1. Write a Java program to check whether a given string starts with the contents of
another string.
Sample Output:
Red is favorite color. Starts with Red? True
Orange is also my favorite color. Starts with Red? False
2. Write a Java program to remove the duplicate elements of a given array and return
the new length of the array.
Sample Output:
Sample array: [20, 20, 30, 40, 50, 50, 50]
Original array length: 7
Array elements are: 20 20 30 40 50 50 50
The new length of the array is: 4
3. Hackerrank challenge: Java String Introduction
https://www.hackerrank.com/challenges/java-strings-introduction/problem](https://image.slidesharecdn.com/assignmentjavaworkshop-210920045506/85/Assignment-java-workshop-1-320.jpg)