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

Write a program to take a String as input then display the position of a particular character given as input using indexOf() function of String class. Don't use charAt() function.

Enter a String

Elephants are the largest mammals

Enter character to find: e

Index Position: 0 2 12 16 22


Consider following class Certification with following data members Id (int), name (String) ,hours(int),level (String),costPerHr (double). Provide a class StudentCertification that extends Certification. This class has an additional data member rebate (double). Override the calculateFee method so that the total cost is calculated by getting the total for the training hours @costPerHr and applying the rebate (%). E.g. if the costPerHr is 200 and 50 hours training and 0.2 rebate then the calculateFee should return 10000 – 0.2 *10000 = 8000. Provide another sub class ProfessionalCertification that extends Certification. This class no additional data member. It overrides calculateFee method so that total cost is returned as product of hours and cost per hour plus 15% tax of total hours cost. Also ProfessionalCertification implements Extendible Interface. You will also have to provide the implementation of method extend(int duration). For this you need to add the duration to training hours of the certification  


Write a method called sumFirstAndLastDigist() with one parameter of type int called number.


.


The methods needs to find the first and Last digist of the parameter number passed to the method, using a loop and return the sum of the first and Last digis


.


Here's an example:


Let's say you call sumFirstAndLastDigit(23456);


This should return 8 because 2 + 6 = 8

You are required to build an application for charity organization. Your application will keep track of the items given out as charity. The items are donated by people and your application will keep track of each donation in persistence store. CharityItem: description (String), quantity (int), estimatedAmount (double), donor name (String), Donor contact (String) You are also required to do some exception programming/handling. If a charity with a value greater than 2 lacs is donated, then you will raise the ShowOffCharityException. You will have to create an exception class for this and the exception will be raised from the constructor of the CharityItem class under the said condition. You will also write code at other places wherever required to deal with this exception. Please note that you will make your ShowOffCharityException as a checked exception. 


Provide another sub class ProfessionalCertification that extends Certification. This class no additional data member. o It overrides the calculateFee method so that the total cost is returned as the product of hours and cost per hour plus 15% tax of the total hours cost. o Also the ProfessionalCertification implements the Extendible Interface. You will also have to provide the implementation of method extend(int duration). For this you need to add the duration to the training hours of the certification  The correctness of your code will be checked against a main program that will be provided along with the expected output


Q. No. 02 Consider the following class Certification with following data members Id (int), name (String) , hours(int), level (String), costPerHr (double) Implementation of this class is provided on moellim. You are required to do the following  Provide a class StudentCertification that extends Certification . This class has an additional data member rebate (double) o Override the calculateFee method so that the total cost is calculated by getting the total for the training hours @costPerHr and applying the rebate (%). E.g. if the costPerHr is 200 and 50 hours training and 0.2 rebate then the calculateFee should return 10000 – 0.2 *10000 = 8000 


Create following Registration Form using Swing in Java.


Save entered data in array of strings. After Submit, following dialogue box should be displayed.



Consider class Certification with data members Id (int), name (String) , hours(int), level (String), costPerHr (double). You are required to  Provide a class StudentCertification that extends Certification . This class has additional data member rebate (double) o Override the calculateFee method so that total cost is calculated by getting total for training hours @costPerHr and applying rebate (%). E.g. if costPerHr is 200 and 50 hours training and 0.2 rebate then calculateFee should return 10000 – 0.2 *10000 = 8000  Provide another sub class ProfessionalCertification that extends Certification. This class no additional data member. o It overrides calculateFee method so that total cost is returned as product of hours and cost per hour plus 15% tax of total hours cost. o Also ProfessionalCertification implements Extendible Interface. You will also have to provide implementation of method extend(int duration). For this you need to add duration to the training hours of the certification write main class


Consider following class Certification with following data members Id (int), name (String) ,hours(int),level (String),costPerHr (double). Provide a class StudentCertification that extends Certification. This class has an additional data member rebate (double). Override the calculateFee method so that the total cost is calculated by getting the total for the training hours @costPerHr and applying the rebate (%). E.g. if the costPerHr is 200 and 50 hours training and 0.2 rebate then the calculateFee should return 10000 – 0.2 *10000 = 8000. Provide another sub class ProfessionalCertification that extends Certification. This class no additional data member. It overrides calculateFee method so that total cost is returned as product of hours and cost per hour plus 15% tax of total hours cost. Also ProfessionalCertification implements Extendible Interface. You will also have to provide the implementation of method extend(int duration). For this you need to add the duration to training hours of the certification  


write an employee class storing above mentioned information ,employee id, employee salary name,title write a piece of code that creates an arraylist of 100 objects of employee and store the information in the file wrte a method that reads the above stored information from file and prints the employee detail


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS