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 class named Mobile that holds data about a mobile in a retail store. The class should have the following member variables:


• Name/brand. A string that holds name of the brand of phone.


• unitsOnHand. An int that holds the number of units currently in inventory.


• price. A double that holds the retail price.


Write a constructor that accepts arguments for each member variable, appropriate functions that store values in these member variables, and accessor functions that return the values in these member variables.


Once you have written the class,


Write another class Store (link list) having Mobile as a node then provide function to insert new mobile in list and to Delete a mobile and to display all mobiles.


Write a main program that shows all the functionality.


Note: you have to implement all scenarios (insert and delete at start, end, in between).



Write a program that takes in an integer in the range 11-100 as input. The output is a countdown starting from the integer, and stopping when both output digits are identical. End with a newline.

Ex: If the input is:

93

the output is:

93 92 91 90 89 88

Ex: If the input is:

11

the output is:

11

Ex: If the input is:

9



Given a line of text as input, output the number of characters excluding spaces, periods, exclamation points, or commas.

Ex: If the input is:

Listen, Mr. Jones, calm down.

the output is:

21

Note: Account for all characters that aren't spaces, periods, exclamation points, or commas (Ex: "r", "2", "?").



Do you like reading books? If you do, then you must have encountered texts that have quite a wide space with dots in between them, just like pausing or thinking before proceeding the narration. Let’s try doing that here in C, shall we?




Input




Two lines containing a string on each.




Cody



Handsome



Output




Multiple lines containing a string on each.




Cody



.



.



.



Handsome

Create a program that computes the perimeter of a square, rectangle and the circumference of a circle using interface using Abstraction


Create a program that implements the concept of abstract methods and classes. Decide which class to use to properly illustrate your solution.


Create a program that implements at least 4 combination of method overriding and overloading. Decide which class to use to properly illustrate your solution.


Create a class for Waterbender, Earthbender, Firebender, and Airbender as subclasses of the superclass Avatar. The subclasses provide their actual implementation, Firebender must return a String containing the phrase "Fire attack!”, Waterbender = “Water attack!”, Airbender = "Air attack!”, and Earthbender = "Stone attack!". Create a testdriver called TestAvatar to demonstrate the classes. Apply the concept of Inheritance and Polymorphism.





Sample Output:


Fire attack!


Water attack!


Air attack!


Stone attack!


Default attack!




Create a test driver for the ShapeCone Class. Make sure that the program will ask first for the height and radius of the Cone. The output of your program should look like this:





Radius: 2.4




Height: 3.5




Color: bue




Base Area: 18.09557




Volume: 21.1115

a java program that will compute the surface area and volume of a cube using class

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS