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

Cindy uses the services of a brokerage firm to buy and sell stocks. The firm charges 1.5% service charges on the total amount for each transaction, buy or sell. When Cindy sells stocks, she would like to know if she gained or lost on a particular investment. Write a program that allows Cindy to input the number of shares sold, the purchase price of each share, and the selling price of each share. The program outputs the amount invested, the total service charges, amount gained or lost, and the amount received after selling the stock.

Write a program that prompts the user to input the amount of rice, in pounds, in a bag. The program outputs the number of bags needed to store one metric ton of rice.

Predict the output of the following program?


class Test {


protected int x, y;


}


class Main {


public static void main(String args[]) {


Test t = new Test();


System.out.println(t.x + " " + t.y);


}


}


debug the code for displaying numbers 1 to 10 using do￾while loop.

Class doWhile

{

public static void main(String[] args)

{

int num =1;

do

{

System.out.println(num);

}while(num>=10)

}

}


The following code results in compile time error. Identify the error.

public static void display ()

{

int n =123456;

float f =100.12;

System.out.println(“Float value ” +f);

}


a clinical management system has functionalities, such as appointments for patients, managing medication, keeping track of overall resources is quite a challenge. Key elements within this system could be but are not limited to visiting doctors, nurses, patients, medication, and general stationaries. There may be different levels of nurses within the system and some of their tasks could be placing orders for new medication and scheduling patients for visits. The patients, on the other hand, may request an appointment and upon visiting the clinic they get to be prescribed medication by either the visiting doctor or the nurse. Medication within the clinic system is kept as inventory and nursing staff should be able to track the respective levels of medication, with the intention of placing an order if levels are low, from this information complete UML diagram that relates all the classes.


Your task is to follow the steps discussed this week on OO analysis and Design, then identify the key objects, classes, and their relations. With the identified relations outline the key functionalities of the system.


The following will be expected as part of the submission:


A) Class diagrams and respective Object Diagrams


B) A Complete UML diagram that relates all the classes


C) Provide a simple implementation of the system described above


a clinical management system has functionalities, such as appointments for patients, managing medication, keeping track of overall resources is quite a challenge. Key elements within this system could be but are not limited to visiting doctors, nurses, patients, medication, and general stationaries. There may be different levels of nurses within the system and some of their tasks could be placing orders for new medication and scheduling patients for visits. The patients, on the other hand, may request an appointment and upon visiting the clinic they get to be prescribed medication by either the visiting doctor or the nurse. Medication within the clinic system is kept as inventory and nursing staff should be able to track the respective levels of medication, with the intention of placing an order if levels are low, from this information provide a simple implementation of the system described above.


a clinical management system has functionalities, such as appointments for patients, managing medication, keeping track of overall resources is quite a challenge. Key elements within this system could be but are not limited to visiting doctors, nurses, patients, medication, and general stationaries. There may be different levels of nurses within the system and some of their tasks could be placing orders for new medication and scheduling patients for visits. The patients, on the other hand, may request an appointment and upon visiting the clinic they get to be prescribed medication by either the visiting doctor or the nurse. Medication within the clinic system is kept as inventory and nursing staff should be able to track the respective levels of medication, with the intention of placing an order if levels are low, from this information create class diagrams and respective Object Diagrams.


Create a program that will String input. Based on the number of inputs,


the USER will decide what shape it is circle,rectangle,square and triangle.


(1 input – circle, 2 inputs – square or rectangle, 3 inputs - triangle).


The program will then display the shape type, details, perimeter and area.


USE TRY AND CATCH



Justines-MacBook-Pro:classes Justine$ java-jar Shape.jar15


Type:Circle


Radius:15


Perimeter:94.2


Area:706.5




Justines-MacBook-Pro:classes Justine$ java-jar Shape.jar15


Type:Rectangle


Length:24


Width:12


Perimeter:72.0


Area:288.0




Justines-MacBook-Pro:classes Justine$ java-jar Shape.jar15


Type:Square


Side:12


Perimeter:48.0


Area:144.0




Justines-MacBook-Pro:classes Justine$ java-jar Shape.jar 9 15 12


Type:Triangle


Sides:9, 15, 12


Perimeter:36.0


Area:54.0




Justines-MacBook-Pro:classes Justine$ java-jar Shape.jar 9 15 12 8


Invalid input




class:


-TestShape


-Shape


-Circle


-Rectangle


-Square


T-riangle


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS