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

Create a program that will compute the basic salary of the employee, the daily rate of the employee is 80 pesos per hour the regular daily hours of the employee is 8 hours. Compute the total net gross of the employee in 22 days with the following deductions Pag-ibig = 150, SSS = 400, PhilHealth = 200.

Create an array of type comnunitymember

Then create objects of type (employee, student, faculty) by sending the values ​​to the creator of each class

Store these classes in an array and then print these objects with their type specified using the instanceOf . test


In every program data must be validated before the program can proceed with further processing and storage of the input data. As a Windows developer for a data analysis company, you are tasked to develop an application using Windows form / Windows Presentation Foundation (WPF) named mileage efficiency. 

You should include the following in your program 1. Exception handling should be used to prevent users from entering invalid input (text, character...) (try, catch and final)- 20 Marks 2. All exception messages should be display using a message box and save in a text file called Exceptionfile.txt- 20 Marks 3. All result (miles divided by gallon) should be save in a file called MilesperGallon.txt. The result should be saved once the calculate button is pressed – 20 Marks 4. Meaning your program will have two separate text files one to record all exception thrown – message and the other to record all calculation and the date and time the operation occurred- 10 


Read from the input the number of people (int), average slices per person (double), and cost of one pizza (double). Calculate the number of whole pizzas needed (8 slices per pizza). There will likely be leftovers for breakfast. Hint: Use the Math. ceil() method to round up to the nearest whole number and convert to an integer using explicit typecasting to an integer. Calculate and output the cost for all pizzas.


. Calculate and output the sales tax (7%). Calculate and output the delivery charge (20% of cost including tax).


. Calculate and output the total including pizza, tax, and delivery.


 

 


 Repeat steps 1 - 3 with additional inputs for Saturday night (one order per line). Maintain and output a separate total for both parties.




 


Sanchez Construction Loan Co. makes loans of up to R100,000 for construction projects. There are two categories of Loans—those to businesses and those to individual applicants. Write an application that tracks all new construction loans. The application also must calculate the total amount owed at the due date (original loan amount + loan fee). The application should include the following classes: 


  • Create a folder named LastName_FirstName (ex. Reyes_Mark) in your local drive.
  • Create a new Java application project named LabExer1A. In the Create Main Class field, the text should be labexer1a.LabExer1A. Set the project location to your own folder.
  • Initialize four (4) variables based on the table below.

Data Type

Variable Name

Value

int

faveNumber

Type your favorite number.

String

faveCartChar

Type your favorite cartoon or anime character.

char

mi

Type your middle initial.

char (array)

nickNameArray

Every index   should   contain

each of the letters of your nickname.

  • 12 is my favorite number. I love Doraemon!

My name is Veronica V. Velasquez. You can call me Nica.

  • Use comments to give a short description of the parts of the program. Note: Use // for single-line

comments and /* */ for multi-line comments.

  • Inform your instructor once you are done.

1.A method called sine,which takes asits only parameter avalue oftype double,and returns a valueof type doubleThe parameter represents anangle expressed inradians,andthe value returned bythe method representsthe trigonometric sine ofthis angleFor example,suppose thefollowingmethod

call isexecuted:double sin=MathAssignment.sine(1.047197551)

After the execution ofthe above method call,thevalue stored invariable sin willbe(approximately)0.866025404,as the sine of 1.047197551radians is approximately 0.866025404Thesine ofan angle x,denoted sinx,canbe calculated usingthe following algorithm:If x<-π,repeatedly add2π toxuntil-π≤x≤π.Conversely,ifx>π,repeatedlysubtract2π

fromxuntil-π≤x≤πYou MUST use 3.141592653589793 as a value for π

Calculate sinx using the following formula:where t0=xTo calculate the other terms in the sum,we usethe following formula:where ti isan arbitrary term,and ti+1 isthe next termFor example:and so onThelast term in this sum,tn,will bethe firstterm whose absolute valueis lessthan10-10


Create a class called Match that will have team objects and be used for creating a Match of play.

Data Members:

-This class has two data members named HomeTeam and VisitorTeam which are of type Team, they will store that two teams that will play the Match.

Methods:

-This class doesn’t have a default constructor, it only has one constructor which receives two Team object that will be assigned to HomeTeam and VisitorTeam. setTeams(),which receives two Team object that will be assigned to HomeTeam and VisitorTeam.

-playMatch(), simulates match play by calling the scoreGoals methods of each team.

-getPlayGound(), returns the ground of play which is the HomeGound of the HomeTeam. -isDrawMatch(), will return true if the Match is a draw and false if there is a winner.

-The match is a draw if the goals of the teams are equal. getWinner(), returns the team which won the match, a team wins if its goals is higher than the goals of the other team.

-getLoser(), returns the team which lost the match.



create a Java application which will Simulate a Soccer game Match and display the results.

Question 1 – Team.

Create a class called Team that will be used for creating team objects, the class must have the following data members and methods:

Data Members:

-Name,the name of the team.

-HomeGround, the name of the Home stadium of the team.

-Goals, the number of goals that the team scores during the match Choose appropriate types for the data members.

Methods:

-A default constructor which will initialize all data members to proper initial values.

-An overloaded constructor which receives two arguments; a team name and home ground name and it should also initialize the goals to a proper initial value.

scoreGoals(), since a team can score 0 to 4 goals, this helper method must assign the Goals data member to a random number in that range.

-getName(), getHomeGround(), getGoals(), create get methods for each data member


The Math class, which is part of the Java standard class library, provides various class methods that perform

common calculations, such as trigonometric functions.

Write a class called MathAssignment, which provides some of the functionality which is also provided by

the Math class. This class should define the static methods described below:

A method called absoluteValue, which takes as its only parameter a value of type double, and

returns a value of type double. The parameter represents an arbitrary number, and the value returned

by the method represents the absolute value of this arbitrary number. The absolute value of a number

x, denoted |x|, is x if x is greater than or equal to 0, and -x if x is less than 0. For example, suppose the

following method call is executed:

double value = MathAssignment.absoluteValue(-42.0);

After the execution of the above method call, the value stored in variable value will be 42.0, as the

absolute value of -42 is 42.


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS