1. Create a program that maps input numbers 1-7 to corresponding days of the week.
2. Develop a program that takes a student's score as input and returns the corresponding grade based on predefined ranges.
3. Write a program to find and print all three-digit narcissistic numbers (Armstrong numbers).
package com.examples.core;<br><br>import java.util.Scanner;<br><br>public class DayMapper {<br> public static void main(String[] args) {<br> Scanner scanner = new Scanner(System.in);<br> System.out.println("Enter a number between 1 and 7:");<br> int dayNumber = scanner.nextInt();<br> <br> String[] daysOfWeek = {<br> "", // Index 0 is unused<br> "Monday",<br> "Tuesday",<br> "Wednesday",<br> "Thursday",<br> "Friday",<br> "Saturday",<br> "Sunday"<br> };<br> <br> if (dayNumber >= 1 && dayNumber <= 7) {<br> System.out.println(daysOfWeek[dayNumber]);<br> } else {<br> System.out.println("Invalid input! Please enter a number between 1 and 7.");<br> }<br> <br> scanner.close();<br> }<br>}2. Develop a program that takes a student's score as input and returns the corresponding grade based on predefined ranges.
package com.examples.core;<br><br>public class GradeCalculator {<br> public static void main(String[] args) {<br> int score = 76; // Example input<br> String grade = calculateGrade(score);<br> System.out.println("The student's grade is: " + grade);<br> }<br> <br> public static String calculateGrade(int score) {<br> if (score < 0 || score > 100) {<br> return "Invalid score! Please enter a value between 0 and 100.";<br> }<br> <br> if (score >= 90) return "Excellent";<br> if (score >= 80) return "Good";<br> if (score >= 70) return "Average";<br> if (score >= 60) return "Pass";<br> return "Fail";<br> }<br>}3. Write a program to find and print all three-digit narcissistic numbers (Armstrong numbers).
package com.examples.core;<br><br>public class NarcissisticNumbers {<br> public static void main(String[] args) {<br> System.out.println("Three-digit narcissistic numbers:");<br> findNarcissisticNumbers();<br> }<br> <br> public static void findNarcissisticNumbers() {<br> for (int num = 100; num < 1000; num++) {<br> int original = num;<br> int sum = 0;<br> <br> while (original > 0) {<br> int digit = original % 10;<br> sum += digit * digit * digit;<br> original /= 10;<br> }<br> <br> if (sum == num) {<br> System.out.println(num);<br> }<br> }<br> }<br>}