Java | JSP | JSF Answers

Questions: 4 418

Answers by our Experts: 3 943

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

Class name Country
Parameters are:
Private String name;
Private String language;
Private double area;

Write a method that returns an array of type "country". The method asks the user to enter the number of the country. Then the information of each country.

Please help
Design an abstract class GeometricObject with lineColor as data member. GeometricObject must ensure that its children implement calcArea() method. Design Rectangle and Circle classes as children of GeometricObject class with overridden toString() method to return “ Rectangle with ‘w’ width and ‘h’ height is drawn” OR “Circle with ‘r’ radius is drawn”.
- The attribute of Rectangle are length and width
- The attribute of Circle is radius
a. Accept names and marks of 10 students from user
b. Ensure that valid data is entered. If user enters an invalid data then appropriate message should be displayed, e.g. “Name cannot be a number” or “Marks must be an integer value”
c. Display this data in descending order according to the marks such that name of the student having maximum marks should be displayed at the top and the name of the student having minimum marks should be displayed at the bottom.
Accept names and marks of 10 students from user
b. Ensure that valid data is entered. If user enters an invalid data then appropriate message should be displayed, e.g. “Name cannot be a number” or “Marks must be an integer value”
c. Display this data in descending order according to the marks such that name of the student having maximum marks should be displayed at the top and the name of the student having minimum marks should be displayed at the bottom.
Accept names and marks of 10 students from user
b. Ensure that valid data is entered. If user enters an invalid data then appropriate message should be displayed, e.g. “Name cannot be a number” or “Marks must be an integer value”
c. Display this data in descending order according to the marks such that name of the student having maximum marks should be displayed at the top and the name of the student having minimum marks should be displayed at the bottom.
. Write Java Code to input a complete paragraph, as an input. Further, read a single character/letter. Finally, you are required to [Marks = 02]
(a) - Count the number of Words in the paragraph starts with the letter taken as input from the user.
(b)- Display the total number of words in the paragraph
Implement all this scenario using OOP Concepts of Java. Your code should also take care of the exceptions that can occur while dealing with Strings.
Java program to
(a) - Count the number of Words in the paragraph starts with the letter taken as input from the
user.
(b)- Display the total number of words in the paragraph
How the compilation process of the Java language is different from that of C++ programming language. Discuss in details.
write a java code
a. Accept names and marks of 10 students from user
b. Ensure that valid data is entered. If user enters an invalid data then appropriate message should be displayed, e.g. “Name cannot be a number” or “Marks must be an integer value”
c. Display this data in descending order according to the marks such that name of the student having maximum marks should be displayed at the top and the name of the student having minimum marks should be displayed at the bottom.
(a)- How the compilation process of the Java language is different from that of C++ programming language. Discuss in details.

(b)- There is an application which inputs hundred numbers from the user, if user enters a positive number it increments valid numbers count. But if a user enters other than integer it terminates. You are required to make changes in given code such that instead of termination it shows message “input is not valid” and re input a number.
importjavax.swing.*;
publicclass QuestionNumber4 {
publicstaticvoidmain(String[] args) {
intcountValidNumber=0;
int num;
for(inti=0;i<100;i++){
System.out.print("Enter a Positive Number:");
String s1 =JOptionPane.showInputDialoge(“enter number”,null);
num = Integer.parseInt(s1);
if(num>0){
countValidNumber++;
}
}
System.out.println("Valid Numbers Are:"+countValidNumber);
}
LATEST TUTORIALS
APPROVED BY CLIENTS