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 display the corresponding remark of a given input grade. The range of grades and its corresponding remark are given below:



Note: Use switch case statement



Range of Grades Remarks


90-10 Excellent


80-89 Good


75-7 Fair


50-74 Poor


Other grades Out-of-range



Create a program that will display the corresponding remark of a given input grade. The range of grades and its corresponding remark are given below:



Note: Use switch case statement



Range of Grades Remarks


90-10 Excellent


80-89 Good


75-7 Fair


50-74 Poor


Other grades Out-of-range











Range of Grades Remarks


90-10 Excellent


80-89 Good


75-7 Fair


50-74. Poor


Other grades Out-of-range

In a school there are students and teachers, but they all are persons. An every “Person” has attributes “name”, “age” and “gender”. Every person should have a method to set their details(setPersonDetails()) and to print their details(printPersonDetails()).


1) Create a class Course with instance members – Course Code and Course Title. Include default and parameterized constructors to initialize the instance members and a display method.


Create another class called CAT1MCQ that extends Course class. The class should include the instance members – Question, Choice1, Choice2, Choice3, and correctChoice. Include default and parameterized constructors to initialize the instance members and a display method.


Create an interface VerifyAnswer with a method verify().


Create another class that extends CAT1MCQ and implements VerifyInterface. The class should override verify() to display the course details, question and choices and wait for the user to enter the answer. Once the user inputs the answer, check is if matches with the correctChoice or not.


Create a main class that test the above hierarchy for an array of 'n' objects.



Given the definition of Laptop class as follows:

public class Laptop

{

private String brand; //HP, Acer, ASUS

private double price; //price per unit

private int RAM; // memory space in GigaByte(GB),e.g:2,4

private int USBport; //number of USB port e.g:2, 3, 4

//normal constructor: public Laptop (String, double, int, int)

//processor method: upradeRAM(int)

//accessors: getBrand (), getPrice(), getRAM(), getUSB()

}


2. Write the upgradeRAM(int) processor method as folows:

A processor method named upragedRAM(int) that receive the size of RAM to be upgraded as its parameter. This method will determine and return the price of RAM based on the following table:


RAM Size Price(RM)

8GB 98.00

16GB 299.00


3. Write main program :

a. Declare an array of objects named Laptops that store 10 laptop objects.

b. Ask user to enter all information required and store the data in the array above.

c. Calculate and display the total price of all Acer laptops

d. Display the brand of laptop that provides 4 USB ports



Create a Class User having following data members

Name (String)
Phone (String) T
Address (Address Class) -> Perform Dependency Injection
Team (Team Class) -> Perform Dependency Injection

Address Class have following data members
Address Line 1 (String)
Address Line 2 (String)
City (String)
State (String)
PINCODE (Integer)

Team Class have following data
Team Name (String) >> To be taken from properties file
Number of members (Integer) >> To be taken from properties file
Project (Project Class) -> Dependency Injections

Project Class have following Data
List of Sub Projects (Array List)

Implement the same using Spring 5 Annotation and XML Approaches

Create Beans for multiple employees and fetch the same in the Main Class.

Note: Create two different projects one for Annotations Based Approach and other for XML based approach.

Create a class called Book that contains instance variables like

BKName, BKId and BKAuthor, a parameterized constructor to

initialize its instance variables, a method BKUpdateDetails(String

name, int id, String author), that accepts new values for name, Id and

author as parameters and updates the corresponding instance variable

values of that object and another method BKDisplay() to display the

book details. Create a class BookDemo and provide main method for

instantiate a Book object, display the original book details, update its

details with new values, and display the updated book details.


Create a program that will display the corresponding college level of s given input year level. The year and the college are given below:



Note: Use if else if statement.



Year Level College Level


1 Freshmen


2 Sophomore


3 Junior


4 Senior


Other years Unlisted Level

Write a program that will allow the user to input two (2) numbers and mathematical operation (+, -, *, /).


3. Write a program with which you can convert a human height given in feet and inches



to centimeters. The program should ask the user to type in his or her height in two



parts: first the height in feet and then the inches part for the height. (A person can



say that his or her height is, for example, 5 feet and 9 inches. That would be 30.48



* 5 + 2.54 * 9 centimeters.



There can be thus two separate input statements in the program. After the program



has received the feet and the inches, it should calculate the corresponding value in



centimeters and print it to the screen.


LATEST TUTORIALS
APPROVED BY CLIENTS