Design a Java application that will allow a user to capture the top students for a module. Allow the
user to enter in the module name, followed by the number of students the user would like to
capture.
Continue to capture the results for the number of students entered. Once all the student results
have been captured create a results report.
In the results report display the student results entered, a student count and the average result
obtained.
At Mr. G school of Programming, the final school fees to be paid is calculated as follows.
Original Fees should be greater than or equal to R50 000
Minimum fixed deposit of R10 000
If deposit is greater than pr equal to half the original fees, you get a 5% discount from the original fees
Final total fees will also include the following
School Levy is 10% of original fees
Sports fee is 5% of original fees.
Write a program the calculates the final total fees to be paid.
Program must request user to enter original fees value greater then R50 000.
Program should also request user to enter amount to deposit before calculating final total fees.
using SWITCH selection statement
Write a Program that will ask the user to accept 5
integers, select an arithmetic operation for odd
and even, and perform the corresponding
operation.
Enter the first number: 34
Enter the second number: 25
Enter the third number: 62
Enter the fourth number: 13
Enter the fifth number: 27
Choose which operation you want to perform:
1. Addition
2. Subtraction
Enter the operation of odd: 1
Enter the operation of even: 2
The sum of odd numbers is: 65
The difference of even numbers is: -28
Develop and deploy a web based “Programme Information System” using JSP, any database backend and any web server. Your system should use JDBC for input of information to both the tables
COMPLETE THIS CODE(DONT CHANGE)
package myqueue_J;
public class MyQueue_J {
public int data;
public MyQueue_J next;
public static MyQueue_J front=null;
public static MyQueue_J rear=null;
public static MyQueue_J temp=null;
public MyQueue_J(int d, MyQueue_J n) {
data=d;
next=n;
}
public static void enqueue(int d){
MyQueue_J temp = new MyQueue_J(d, null);
Insert to perform enqueue operation
}
public static void dequeue(){
Insert to perform dequeue operation
}
public static int printQueue(){
int ctr=0;
Insert to display the elements in the queue
}
public static void main(String[] args) {
Insert to perform the desired output
}
}
THE OUTPUT
After the Enqueue operations:
1. Element Front: 10
2. Element rear: 30
3. Elements in the Queue: 10 15 20 25 30
4. Number of Elements in the Queue: 5
The dequeued element is 10.
The dequeued element is 15.
After the Dequeue operations:
1. Element Front: 20
2. Element rear: 30
3. Elements in the Queue: 20 25 30
4. Number of Elements in the Queue: 3
2 Problem description In this labwork you are expected to implement a program that builds a computer for different purposes using Template Method pattern. Your program needs to able to build two types of computers which is Gaming and Office. CPU, Memory and type of storage depends on the computer type. For a gaming computer you need to put: ∗ High-end multi-core cpu ∗ High-clock speed memory ∗ SSD storage For an office computer you need to put: ∗ Low-end dual-core cpu ∗ Energy-efficient memory ∗ Energy-efficient HDD However, way you build a computer is a set of pre-determined steps: ∗ Plug CPU ∗ Plug Memory ∗ Plug Storage ∗ Plug peripherals (which are common for both type of computer)
3 Measure of success You are expected to implement necessary classes for this example using Template Method Pattern.
Create your own NetworkServer and NetworkClient applications as following.we will name them as MyComputerServer and MyComputingClient .The Client send two numbers and the server send back addition of the two numbers
Encapsulation
Create a class main and class for a point (that has an x-coordinate and a y-coordinate). Also, create another class called Rectangle. The Rectangle should have 2 points, the top left and the bottom right. Implement the following methods for the Rectangle:
Input
A pair of numbers representing the points for the rectangle (x and y).
5 8Output
The first few lines contain the drawn rectangle. After one empty line, the next line prints either "RECTANGLE" or "SQUARE".
#·#·#·#·#·#
#·········#
#·········#
#·········#
#·········#
#·········#
#·········#
#·········#
#·#·#·#·#·#
RECTANGLE
AREA:·40
PERIMETER:·26
CENTER·POINT:·(2.50,4.00)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
Write a Java program that will ask the user to enter a string then copy the given string to a char array(array of characters; please see sample code below). The program will then swap the first and last word in char array and store the result in another char array.
The program should also meet the following requirements:
· It will display the original string and the new string(after swapping).
· It will display the first and last word.
· Use of StringBuffer, StringBuilder, and String class after the string was copied to an array of characters is not allowed.
· Use of any String, StringBuilder, StringBuffer, and Array method is not allowed.
· It should execute for as long as the user wants to continue.
· Create and use this method in your program:
displayArray()
{
//display array
}