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

given Java code within the link, figure out how it works. 

The code is already written. You need to fix the code so it accepts *,/ and ^ operations

need to add multiplication, addition, and power


https://drive.google.com/file/d/1NoVc1HNT9kPNJhnFg0x2V44tak9C0x4c/view?usp=sharing


Modify the code following grammar. 

<expr> -> <te rm> { <add op> <exPr>} 

<te rm> -> <factor> { mult opp> <Term> } 

<factor> -> <primary> <factor> I <primary> 

<primary> -> .(. <expr> .) ' ) <factor> I identifier I number 

<add op>  -> '+' I ' - '

<mult op>  -> ' * ' I ' / ' I %

Make sure your solution works correctly for exponents (and left associativity) for example: 

4^2 = 16 and 2^3^2 = 512 



You have to design your own Java console application about any valid problem that your application must solve. Your solution can include solving a business problem, a new idea or even a game. Your application must make use of concepts such as arrays, loops, inheritance, constructors and information hiding. Output must be shown in the form of a report using the console.

Required:

1. Code the classes Employee, Manager and Secretary.

2. Code an application with a main method. In this class you must code an array of type Employee with a maximum size of 20.

a. Add a minimum of 10 objects to the array. You may hard-code these object values. The objects must be a mixture of Employee, Manager and Secretary.

b. Display all the objects on the screen.

c. Calculate, and then display, the average salary of all employees.

Extra

Calculate and display the cost of the leave to the company for each employee.


Your application must make use of concepts such as arrays, loops, inheritance, constructors
and information hiding. Output must be shown in the form of a report using the console.
In your solution, make use of as many concepts, and components dealt with in this course, but
pay special attention to the following learning units:
• Learning Unit 1: Advanced arrays.
• Learning Unit 2: Introduction to inheritance
Your application must make use of concepts such as arrays, loops, inheritance, constructors
and information hiding. Output must be shown in the form of a report using the console.
In your solution, make use of as many concepts, and components dealt with in this course, but
pay special attention to the following learning units:
• Learning Unit 1: Advanced arrays.
• Learning Unit 2: Introduction to inheritance

Extreme IT Products is a local supplier that specializes in the sales of the latest Information Technology hardware devices. The business has recently opened an outlet in the town you reside and has hired the software development house you work for to design a Java application to manage their products.


WRITE A PROGRAM WHICH CAN FORM UP FOREX CHARTS, CANDLESTICK AND READ THE TIME WHICH WILL ALLOW THE TRADER TO TRADE NASDAQ AND GOLD AND OTHER PAIRS


Write a menu driven program in Java to automate the ATM operations by

demonstrating the concepts of interfaces. And create custom exceptions to

deal with the following situations

a. Invalid PIN number is entered more than 3 times

b. Withdraw operation when balance amount < withdraw amount


Create a class "House", with an attribute "area", a constructor that sets its value and a method

"ShowData" to display "I am a house, my area is 200 m2" (instead of 200, it will show the real

surface). Include getters an setters for the area, too.

• The "House" will contain a door. Each door will have an attribute "color" (a string), and a method

"ShowData" wich will display "I am a door, my color is brown" (or whatever color it really is).

Include a getter and a setter. Also, create a "GetDoor" in the house.

• A "SmallApartment" is a subclass of House, with a preset area of 50 m2.

• Also create a class Person, with a name (string). Each person will have a house. The method

"ShowData" for a person will display his/her name, show the data of his/her house and the data

of the door of that house.



Create a Java program that simply outputs the text "Hello World" when you run it. Call your main class

"Application". In the same file as your main "Application" class, define a new class called "Person". You

don't need to put anything in the class. Now, right below where you output "Hello World" in your main

method, create an object from that (Person) class. Modify your "Person" class to add a constructor.

Make the constructor output the text "Constructor running!". Add another constructor in addition to

the constructor it's already got. Make this second constructor accept a parameter called name of type

String. Make this second constructor print the name parameter using System.out.println(). Finally,

change your "main" method, create two objects of Person class and call both constructors.


LATEST TUTORIALS
APPROVED BY CLIENTS