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

2. Please construct a class in terms of the below description. (5 marks)

HKIT needs to develop a system to keep the students’ profile including the name, student id, the programme enrolled by the student, address of student and age. Student could read and modify his/her profile. Please help construct a Student class for this purpose.

class Student {

//variables (2 marks)

//getter (one getter is ok) (1 mark)

//setter (one setter is ok) (2 mark)


Write if-else statement that outputs

Student must achieve at least 40 in the exam grade and 70% in the attendance in order to pass the module (print out “You pass the module!”). If the student fails the attendance only, the student needs to take classes to make up the attendance (print out ”Please take classes to make up your attendance.”) . If the student fails the exam grade only, the student is eligible to apply re-exam (print out “You are eligible for re-exam”). If the student fails both the exam and the attendance, the student needs to retake the whole module (print out Please retake the module”).

The variables attendance is of type double, and grade is of type int.

if (______________________ ) {

_______________________________________________________

}

elseif (___________________) {

______________________________________________________

}

elseif (___________________) {

______________________________________________________

}

else {

______________________________________________________

}


Write a program reads and store 10 integer elements in an array 



Create a Java EE Web application to create a web application about music (songs, tutorials, instruments, etc.)



Functional requirements:


1.     Proper UI (5 marks)

At least 2 tables in the database with CRUD feature and Normalization 


Find latitude and longitude of utmost 20 countries, ordered by population, with a population greater or equal to the population limit given below and have atleast one currency exclusively for themselves. (countries like Madagascar, Sri Lanka but not India, USA). Use the country details from this dataset.

Your task is to find the sum of the length of all lines (in kms) that can be drawn between co-ordinates of these countries.

  • Assume radius of earth: 6371 km
  • Round length of each line and final result to 2 decimal points
  • If co-ordinates are missing for any country use 0.000 N 0.000 E

Population limit: 15933883

Note: Population limit will change at random intervals. So please make sure answer is computed for the correct population limit before submitting.

  • Create an Account class with the following attribute: Owner (String), id (int, should be auto-incremented), balance (double).
  • To create a new account, you only provide the name of the owner, the balance is then set to 0 and the account is assigned an ID (that is automatically incremented).
  • Create a method to do a deposit of money in the account object.
  • Create a method toString() that returns the details of your account in the following format: “Account N° 2 , Owner: Charlie, Balance: 200.0”.
  • Improve your program in order to prompt the user to enter name of the owner and the initial balance at each creation of the account.

Some animals can scream, others are mute. We will represent the fact of shouting by means of a method displaying on the screen the shout of the animal (Miaou, Wouf ...).

- Write an interface containing the method allowing to scream.

- Write the classes for cats, dogs and rabbits (which are mute)

- Write a program with an array of animals that can scream, fill it with dogs and cats and then make all these animals scream. Describe what is displayed on the screen when this program is run.


A member class has id, name and payment rate. In member class make 1 abstract method: calculateSalary(): that calculates Salary of each member in arraylist. Write another class ContractMember that extends Member

a. Provide a data member contractStart and contractEnd (LocalDateTime) 

b. Provide a static constant TAXRATE and initialize it to 0.07

c. Provide getters, setters and appropriate constructors

d. Override the method calculateSalary which calculates the salary by finding the number of days between the start and end of the contract and callculating the salary for these days @ of the rate defined earlier. The method then deducts tax from this amount @ the TAXRATE and returns the net payable amount as salary.

e. Override the toString to match the output 


You are required to write builds a record book for Projects being conducted at a department. A Project has an id, description, a list of members and start and end dates. In Project class make 2 abstract methods: getTeamSize(): that finds and returns the size of the team working on this project c and calculateCost(): that finds and returns the total cost of project. Provide the class MixedTeamProject which extends Project


a. This class represents a project that can have mixed types of members


b. Override the getTeamSize() appropriately so that it counts all members but makes sure that only active adhoc members are counted if there are any


c. Provide the implementation of calculateCost method so that the cost is calculated as under


i. Salaries are added for adhoc members


ii. Salaries of contract members are added but 11% tax is added for each contract member salary


iii. Salary of all hourly member is added and a flat amount of 1000 is added to cover additional cost.


Write a program to store following numbers in an array

3 10 -15 20 12 8 -3 7

then display all the numbers without showing negative numbers(i.e. -15 and -3)


LATEST TUTORIALS
APPROVED BY CLIENTS