Java | JSP | JSF Answers

Questions: 3 611

Answers by our Experts: 3 611

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

In plane geometry, the x- and y axis of a 2D Cartesian system divide it into four infinite regions called quadrants. Your task is to model each point with an x-value and y-value. Apart from the constructors, getters, and setters, implement a getQuadrant method to determine the region in which a given point falls.

  

    Sample Run1                                                           Sample Run2

        Enter the x and y value: 5 8                                          Enter the x and y value: 7 -3

       Output1: Point (5,8) is in Quadrant I                       Output2: Point (7,-3) is in Quadrant IV

Create a project to model students with firstname, lastname, age, gender and student number. Create two constructors, one to be used as default and another to include all attributes. Add a class attribute to keep count of all registered students. Use the class attribute to generate student numbers with the following format 22201XYZ, where XYZ is the current count provided by the class attribute. Implement the respective getters and setters for each attribute. Now given a list of student information create the respective objects and print out their details see samples below, make sure the student class has a toString method.


Sample Run1



2



John Doe 29 M



Kelly Daniela 40 F



Output1:



Full names : John Doe



Age : 29



Gender : M



Student Number : 22201001

1. Create a project to model student with firstname, lastname, age, gender and student number. Create two construtors, one to be used as default and another to include all attributes. Add a class attribute to keep count of all registered students. Use the class attribute to generate student numbers with the following format 22201XYZ, where XYZ is the current count provided by the class attribute. Implement the respective getters and setters for each attribute. Now given an list of student information create the respective objects and print out their details see samples below, make sure the student class has a toString method. Sample Run1 2 John Doe 29 M Kelly Daniela 40 F Output1: Full names : John Doe Age : 29 Gender : M Student Number : 22201001 Full names : Kelly Daniela Age : 40 Gender : F Student Number : 22201002


Create a project to model student with firstname, lastname, age, gender and student number. Create two construtors, one to be used as default and another to include all attributes. Add a class attribute to keep count of all registered students. Use the class attribute to generate student numbers with the following format 22201XYZ, where XYZ is the current count provided by the class attribute. Implement the respective getters and setters for each attribute. Now given an list of student information create the respective objects and print out their details see samples below, make sure the student class has a toString method. Sample Run1 2 John Doe 29 M Kelly Daniela 40 F Output1: Full names : John Doe Age : 29 Gender : M Student Number : 22201001 Full names : Kelly Daniela Age : 40 Gender : F Student Number : 22201002


Given a positive number, create an array with that number as the size and populate it with the items/names provided. Additionally, the program should print out the longest name in the array.

Sample Run1 

           3

         Apple

          Banana

         Kiwi

Output1: Banana is the longest name


Write a class that has three overloaded methods for calculating the areas of the following geometric shapes:

 

•    Circle

•    Rectangle

•    Cylinder 


Create a source code of this Output.

Output:

My name is Kevin Limbo

The sum is: 7

The difference is: 3

The product is: 10

The quotient is: 2.5

2nd year & Augustine SY 2021-2022


Given a positive number, create an array with that number as the size and populate it with the items/names provided. Additionally, the program should print out the longest name in the array.

Sample Run1 

           3

         Apple

          Banana

         Kiwi

Output1: Banana is the longest name


 As a build-up from the previous question, consider 3 possible scenarios of input: A character, number, or word. Your program should then do the following:

  • In case the input is a character it should indicate if it’s a vowel or not
  • when a number is entered then it’s should check if it’s a prime
  • Finally, if a word is entered the system should check if it’s a palindrome or not.

     Sample Run 1                               Sample Run 3

             Enter a character, number or word : c                  Enter a character, number or word : 

             Output 1 : C is not a vowel                                     Output 3 : 7 is a prime number  

Sample Run 2

              Enter a character, number or word: programming

Output 2: Programming is not a palindrome

Using the provided recording and your knowledge from programming 1. Create a program in java that takes in an input from the user and checks whether it’s a number or a word. In case a number is entered the program should print the number to the power 3 and if a word is entered your program should split that word into 2.

Sample Run 1

Enter a number or word: 7

Output 1:

7 to the power 3= 343

Sample Run 2

Enter a number or word: NAMIBIA

Output 2:

The word split in half is : NAMI and BIA 


LATEST TUTORIALS
APPROVED BY CLIENTS