Skip to content

All Java programs which were covered in 4th semester. Important Questions for BYOD

Notifications You must be signed in to change notification settings

AdarshPawar29/CSE310_JavaPrograms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BYOD Practical1

  1. Write an application for Schedule in which it stores different course names, meeting days and times in a two-dimensional array.

Ask the user to enter a course name (such as “CIS 110”), and display the day of the week and time that the course is held (such as “Th 3:30”).

If the course does not exist, display an error message.

  1. Create an application for DayOfWeek that contains the data that represents the days of the week. Display a list of the days, and then prompt the user for a day.

Display business hours for the chosen day. For Example Assume that the business is open from 11 to 5 on Sunday, 9 to 9 on weekdays, and 10 to 6 on Saturday.

  1. Write an application for Schedule in which it stores different course names, meeting days and times in a two-dimensional array.

Ask the user to enter a course name (such as “CIS 110”), and display the day of the week and time that the course is held (such as “Th 3:30”).

If the course does not exist, display an error message.

  1. Create an application for DayOfWeek that contains the data that represents the days of the week. Display a list of the days, and then prompt the user for a day.

Display business hours for the chosen day. For Example Assume that the business is open from 11 to 5 on Sunday, 9 to 9 on weekdays, and 10 to 6 on Saturday.

  1. Write an application for Schedule in which it stores different course names, meeting days and times in a two-dimensional array.

Ask the user to enter a course name (such as “CIS 110”), and display the day of the week and time that the course is held (such as “Th 3:30”).

If the course does not exist, display an error message.

  1. Create an application for DayOfWeek that contains the data that represents the days of the week. Display a list of the days, and then prompt the user for a day.

Display business hours for the chosen day. For Example Assume that the business is open from 11 to 5 on Sunday, 9 to 9 on weekdays, and 10 to 6 on Saturday.

BYOD Practical 2

  1. Create an application for Personal Phone Directory that contains room for first names and phone numbers for N(Value of N will be asked from user) people. Assign names and phone numbers for the first 10 people. Prompt the user for a name, and if the name is found in the list, display the corresponding phone number. If the name is not found in the list, prompt the user for a phone number, and add the new name and phone number to the list. Continue to prompt the user for names until the user enters “quit”. After the arrays are full (containing N names), do not allow the user to add new entries.

  2. Write an application of Input Grades that prompts a professor to enter grades for five different courses each for N students(Value of N will be asked from user). Prompt the professor to enter data for one student at a time, including student ID and course data for five courses. Use prompts containing the number of the student whose data is being entered and the course number—for example, “Enter ID for student #s”, where s is an integer from 1 through N, indicating the student, and “Enter course ID #n”, where n is an integer from 1 through 5, indicating the course number. Verify that the professor enters only A, B, C, D, or F for the grade value for each course.

  3. Create an application for Personal Phone Directory that contains room for first names and phone numbers for N(Value of N will be asked from user) people. Assign names and phone numbers for the first 10 people. Prompt the user for a name, and if the name is found in the list, display the corresponding phone number. If the name is not found in the list, prompt the user for a phone number, and add the new name and phone number to the list. Continue to prompt the user for names until the user enters “quit”. After the arrays are full (containing N names), do not allow the user to add new entries.

  4. Write an application of Input Grades that prompts a professor to enter grades for five different courses each for N students(Value of N will be asked from user). Prompt the professor to enter data for one student at a time, including student ID and course data for five courses. Use prompts containing the number of the student whose data is being entered and the course number—for example, “Enter ID for student #s”, where s is an integer from 1 through N, indicating the student, and “Enter course ID #n”, where n is an integer from 1 through 5, indicating the course number. Verify that the professor enters only A, B, C, D, or F for the grade value for each course.

  5. Create an application for Personal Phone Directory that contains room for first names and phone numbers for N(Value of N will be asked from user) people. Assign names and phone numbers for the first 10 people. Prompt the user for a name, and if the name is found in the list, display the corresponding phone number. If the name is not found in the list, prompt the user for a phone number, and add the new name and phone number to the list. Continue to prompt the user for names until the user enters “quit”. After the arrays are full (containing N names), do not allow the user to add new entries.

  6. Write an application of Input Grades that prompts a professor to enter grades for five different courses each for N students(Value of N will be asked from user). Prompt the professor to enter data for one student at a time, including student ID and course data for five courses. Use prompts containing the number of the student whose data is being entered and the course number—for example, “Enter ID for student #s”, where s is an integer from 1 through N, indicating the student, and “Enter course ID #n”, where n is an integer from 1 through 5, indicating the course number. Verify that the professor enters only A, B, C, D, or F for the grade value for each course.

BYOD Practical 3

  1. Write an application of Retirement Goal that prompts a user for the number of years the user has until retirement and the amount of money the user can save annually. If the user enters 0 or a negative number for either value, reprompt the user until valid entries are made. Display the amount of money the user will have if the user earns 5% interest on the balance every year.

  2. Write an application on Population. Assume that the population of Mexico is 114 million and that the population increases 1.01 percent annually. Assume that the population of the United States is 312 million and that the population is reduced 0.15 percent annually. Display the populations for the two countries every year until the population of Mexico exceeds that of the United States, and display the number of years it took.

  3. Write an application of Retirement Goal that prompts a user for the number of years the user has until retirement and the amount of money the user can save annually. If the user enters 0 or a negative number for either value, reprompt the user until valid entries are made. Display the amount of money the user will have if the user earns 5% interest on the balance every year.

  4. Write an application on Population. Assume that the population of Mexico is 114 million and that the population increases 1.01 percent annually. Assume that the population of the United States is 312 million and that the population is reduced 0.15 percent annually. Display the populations for the two countries every year until the population of Mexico exceeds that of the United States, and display the number of years it took.

  5. Write an application of Retirement Goal that prompts a user for the number of years the user has until retirement and the amount of money the user can save annually. If the user enters 0 or a negative number for either value, reprompt the user until valid entries are made. Display the amount of money the user will have if the user earns 5% interest on the balance every year.

  6. Write an application on Population. Assume that the population of Mexico is 114 million and that the population increases 1.01 percent annually. Assume that the population of the United States is 312 million and that the population is reduced 0.15 percent annually. Display the populations for the two countries every year until the population of Mexico exceeds that of the United States, and display the number of years it took.

  7. Write an application of Retirement Goal that prompts a user for the number of years the user has until retirement and the amount of money the user can save annually. If the user enters 0 or a negative number for either value, reprompt the user until valid entries are made. Display the amount of money the user will have if the user earns 5% interest on the balance every year.

  8. Write an application on Population. Assume that the population of Mexico is 114 million and that the population increases 1.01 percent annually. Assume that the population of the United States is 312 million and that the population is reduced 0.15 percent annually. Display the populations for the two countries every year until the population of Mexico exceeds that of the United States, and display the number of years it took.

BYOD Practical 4

  1. Write an application that displays every perfect number from 1 through 1,000. A perfect number is one that equals the sum of all the numbers that divide evenly into it. For example, 6 is perfect because 1, 2, and 3 divide evenly into it, and their sum is 6;however, 12 is not a perfect number because 1, 2, 3, 4, and 6 divide evenly into it, and their sum is greater than 12.

  2. Write an application that take a number from the user and find the position of only the even digits from that number, And then calculate sum of all such positions, and display it. Eg. 9 8 4 3 2 5 is the number, 1 2 3 4 5 6 are the positions respectively, (Take the positions from west to east and starting from 1). Position of even digits is 2,3,5, sum= 10. The input is the number and the output is the sum. Test case 0: i/p 9823 o/p 5 Test case 1: i/p 232 o/p 4 Test case 2: i/p 88134 o/p 8 Test case 3: i/p 234236 o/p 14 Test case 4: i/p 329468 o/p 17 Test case 5: i/p 989698969 o/p 20 Test case 6: i/p 8811445566 o/p 33

  3. Write an application that displays every perfect number from 1 through 1,000. A perfect number is one that equals the sum of all the numbers that divide evenly into it. For example, 6 is perfect because 1, 2, and 3 divide evenly into it, and their sum is 6;however, 12 is not a perfect number because 1, 2, 3, 4, and 6 divide evenly into it, and their sum is greater than 12.

  4. Write an application that take a number from the user and find the position of only the even digits from that number, And then calculate sum of all such positions, and display it. Eg. 9 8 4 3 2 5 is the number, 1 2 3 4 5 6 are the positions respectively, (Take the positions from west to east and starting from 1). Position of even digits is 2,3,5, sum= 10. The input is the number and the output is the sum. Test case 0: i/p 9823 o/p 5 Test case 1: i/p 232 o/p 4 Test case 2: i/p 88134 o/p 8 Test case 3: i/p 234236 o/p 14 Test case 4: i/p 329468 o/p 17 Test case 5: i/p 989698969 o/p 20 Test case 6: i/p 8811445566 o/p 33

  5. Write an application that displays every perfect number from 1 through 1,000. A perfect number is one that equals the sum of all the numbers that divide evenly into it. For example, 6 is perfect because 1, 2, and 3 divide evenly into it, and their sum is 6;however, 12 is not a perfect number because 1, 2, 3, 4, and 6 divide evenly into it, and their sum is greater than 12.

  6. Write an application that take a number from the user and find the position of only the even digits from that number, And then calculate sum of all such positions, and display it. Eg. 9 8 4 3 2 5 is the number, 1 2 3 4 5 6 are the positions respectively, (Take the positions from west to east and starting from 1). Position of even digits is 2,3,5, sum= 10. The input is the number and the output is the sum. Test case 0: i/p 9823 o/p 5 Test case 1: i/p 232 o/p 4 Test case 2: i/p 88134 o/p 8 Test case 3: i/p 234236 o/p 14 Test case 4: i/p 329468 o/p 17 Test case 5: i/p 989698969 o/p 20 Test case 6: i/p 8811445566 o/p 33

About

All Java programs which were covered in 4th semester. Important Questions for BYOD

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages