Write a Java application and use a Two dimensional array to store five Dutch, French and Italian translated words. Use a single array to store the English words.
Sample Output
My Stack Operations
1. Size of stack after push operations: 5
2. Top of the Stack: 12
3. Pop elements from stack : 12 36 4 23 10
4. Size of stack after pop operations : 0
Complete the code
package mystackusingarray;
import java.util.EmptyStackException;
public class MyStackUsingArray {
public int arr[];
public int size;
static public int top = 0;
public MyStackUsingArray(int s) {
size = s;
arr = new int[s];
}
public void push(int element) {
if (isFull()) {
System.out.print("Stack full"); }
else {
Insert statement push operation
}
}
public int pop() {
if (isEmpty()) {
System.out.print("Stack empty");
}
Insert statement pop operation
}
public boolean isEmpty() {
if (top == 0) {
return true;
}
else
return false;
}
public boolean isFull() {
if (top == size) {
return true;
}
else
return false;
}
public int peek() {
Insert statements for peek operation
}
public static void main(String[] args) {
MyStackUsingArray stack = new MyStackUsingArray(10);
statements desired output
explain to the stakeholder the concept of high-level languages and highlight any five benefits of using java as the chosen programming language for their development project. Include two other examples of high-level languages besides java
Design an application that extends JFrame and that displays a blue smiling face on the screen. Save
the file as Smile.java.
Write a Java GUI application that will keep track of student results at a local college. The application must contain the results that a student has obtained for a test, assignment and exam. Q.3.1 On the form create a list box that will allow the user to select the student ID populated from the text file. Also create a search button that when clicked will display the average, highest and lowest result according to the student number.Q.3.2 Create a sequential file (student.txt) that contains data for the following fields: The student ID number; The student test result; The student assignment result; The student exam result. Q.3.2 Load the data from the student.txt file and populate the list box with the student numbers. Q.3.3 Calculate the average result obtained by the student. Q.3.4 Determine the highest and lowest result that the student obtained from the three assessments.
Retail store has preferred Customer plan. The amount of customer discount is determined by amount of customercumulative purchases in store. When preferred customer spends $500, he gets 5% discount on future purchases. When preferred customer spends $1,000, he gets 6% discount on future purchases. When preferred customer spends $1,500, he gets 7% discount on future purchases. When preferred customer spends $2,000, he gets 10% discount on all future purchases. Design class named PreferredCustomer which is derived from CustomerData class. PreferredCustomer class have:purchasesAmount (a double) ,discountLevel (a double).The purchasesAmount variable holds total of customer’s purchases to date. The discountLevel variable should be set to correct discount percentage, according to store’s preferred customer plan. Also calculate discount Amount based on discount. Now in Main class create ArrayList and add customers into it and display the customers details, purchase of each customer along with discount he gets.
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 14
Thanks, appreciate it
I cannot put full question here as its too long... so full question is on the link
----------------------------------------------------------------------------------
Write a program that prints portions of Pascal's triangle. The program should repeatedly ask the user to supply the number of rows in the triangle, terminating when the user supplies the value zero. In printing a triangle, the first value in the last row should appear in the first column and each preceding row should start printing three spaces further right........
Create a program that will read the values of A and B. Compare the two values of A & B then print which of the values is higher including the remark "Higher".
Write a CGPA class that has a constructor for initializing four variables: name, matric number, level, and course of study, The program should have two other overloaded methods, one for collecting the credit unit of each course and the other for collecting points based on the grades of each student in each of the courses. Write a third method for calculating the CGPA of a number of students and return the names, matric numbers, levels, course of study, and their current CGPA, well-arranged (using format specifier if necessary). Execute the program using 5 records. Turn in the codes and a snapshot of the result on google classroom.
2. Where's the Biggest One?
by CodeChum Admin
We've already tried comparing 3 numbers to see the largest among all, so let's try a more complicated mission where we locate the position of the largest among 5 numbers. There are only 4 possible cases for this mission:
- if the largest digit is the first digit, print "Leftmost"
- if the largest digit is the third digit, print "Middle"
- if the largest digit is the last digit, print "Rightmost"
- if none of the above is correct, print "Unknown"
Now, show me how far you've understood your lessons!
Input
A line containing a five-digit integer.
1·4·6·3·2
Output
A line containing a string.
Middle