x1 = -b + sqrt(b2-4ac) / 2a
x2 = -b - sqrt(b2-4ac) / 2a
These functions are useful only if the discriminant is non-negative. Let these functions
return 0 if the discriminant is negative.
Write a test program that prompts the user to enter values for a, b, and c, and displays the result based on the discriminant. If the discriminant is positive, display the two roots. If the discriminant is 0, display the one root. Otherwise, display "The equation has no real roots".
In an Application console Project, Give instructions that:
- Create a class "Person"
- Create two classes “Student” and “Teacher”, both inherit from the class "Person".
- The class "Student" will have a public method "GoToClasses", which will display on the screen "I’m going to class. ".
- The class "Person" must have a method "SetAge (int n)" which will indicate the value of their age (for example, 20 years old).
- The class "Student" will have a public method "DisplayAge" which will write on the screen "My age is: XX years old".
- You must create another test class called "Test" which will contain "static void Main()" .
- Create a Person object and make it say "Hello"
- Create a Student object, set its age to 20, make it say "Hello", “I'm going to class. And display his age. - Create a Teacher object, 50, ask him to say "Hello" and then begin the course.
Write a program that computes and assesses the tuition fee of the
students in one trimester, based on the given mode of payment below:
Plan (key) Discount (-) or Interest (+)
Cash (1). 10% discount
Two-Installment (2) 5% discount
Three-Installment(3) 10% interest
The target-user must use the key in selecting or choosing the mode of payment. The first input
data is the tuition fee, and the second input data is the mode of payment.
Sample input/output dialogue:
Enter tuition fee: 20,000 Input data
(Press 1 for Cash, 2 for Two-Installment, 3 for Three-Installment)
Enter mode of payment: 2 Second input data
Your total tuition fee is: 19,000 Output data
Discuss 3 advice that you will give to a multinational corporation when it wants to create a website for its international audiences.
Write a program that reads a string and returns a table of the letters of the alphabet in
alphabetical order which occur in the string together with the number of times each letter
occurs. Case should be ignored. A sample output of the program when the user enters the data
“ThiS is String with Upper and lower case Letters”, would look this this:
a 2
c 1
d 1
e 5
g 1
h 2
i 4
l 2
n 2
o 1
p 2
r 4
s 5
t 5
u 1
w 2
Solution in java ONLY plz... FULL question can be found on the following link http://ntci.on.ca/compsci/java/ch5/5_9.html ---> question 12
----------------------------------------------------------------------------------
Write a program that will read an arbitrary number of sets of three integers. The program should prompt the user for sets of numbers and process them until the user submits the numbers 0 0 0. For each set of three numbers, the program should first print the values read. It should then decide whether or not the three numbers could represent the lengths of the sides of a triangle. If the numbers could not represent the lengths of sides of a triangle, an appropriate message should be printed. If they could, then the program should determine and state into which of the above classes the triangle would be placed.
Write a program to perform deletion operation on BST. While deleting, consider all the deletion cases. a. Deletion of node with degree 0. b. Deletion of node with degree 1. c. Deletion of node with degree 2.
Note: No global declarations
Call the functions in main through menu
Implement the following :
Singly Linked List with following functions :
1)insert_at_head(node* & head, int val);
2)insert_at_tail(node* & head, int val);
3)display(node* head) ;
4)insert_at_pos(node* & head, int val,int pos);
5)delete_at_head(node* & head);
6)delete_at_tail(node* & head);
7)delete_at_pos(node* & head, int pos);
short, English phrases used to explain specific tasks within a program.
The sum of two numbers is an example of an