Create a program that takes in an even sized String and prints out the first half concatenated with
original string separated by a single space.
Sample run 1:
Enter a single string: HelloThere
Output: Hello Hello There
Java considers the String data type as non-primitive, because it contains a sequence of characters and hence there is a predefined class called String dedicated to String processing. The String class has a lot of functions and continues to grow. See https://www.tutorialspoint.com/java/java_strings.htm for more on strings. Your task is to then create a java program that when give a sentence will replace the first occurrence of NUST with Namibia University of Science and Technology.
Sample run 1: Enter a sentence: Welcome to my NUST.
Output: Welcome to my Namibia University of Science and Technology.
Sample run 2: Enter a sentence: The nust is a great institution of high learning.
Output: The Namibia University of Science and Technology is a great institution of high learning.
Given three numbers from user input, decrement the first number by 1 and increment the third number by 2, Then do the magic calculations as follows: get the sum of the first two numbers, deduct the third number from the second and get the product of the first and third number, then sum up the results of the three magic calculations and finally divide you outcome by 3. Sample run 1:
Enter three numbers separated by spaces: 4 2 3
Output: Result of Magic calculations = 5
Sample run 2: Enter three numbers separated by spaces: 2 8 5
Output: Result of Magic calculations = 5
a) Write an Pseudocode to solve the above problem
b) Create a flowchart for the above pseudocode
c) With the help of both your Pseudocode and Flowchart, create a Java program that solves the program as per the given sample out puts and problem description
1 When the user selects to view a report, display the product report generated from the arrays in your application. You must create a class called ReportData which will contain get and set methods for each item required in the report
Name Surname Score
1. Sam Williams 60
2. John Phoenix 85
3. Simon Johnson 75
4. Sarah Khosa 81
5. Mat Jackson 38
6. Nick Roberts 26
7. Isaac Wayne 74
8. Anna Mishima 34
9. Daniel Rose 64
10. Aaron Black 83
11. Jack Mohamed 27
12. Kathrine Bruckner 42
Create a C++ program that has 3 Stacks.
Insert, into the first stack, all the data above (which is the data of student’s names, surnames and the marks they obtain in a particular assessment)
Display the content of the stack on the screen (console)
Then, remove all the students whose surname starts with the alphabets ‘R’, ‘J’ and ‘M’, from the first stack and insert them into the second Stack.
Display the contents of Stack1 and Stack2.
Finally, remove all the students whose marks are less than 50 from both Stack1 and Stack2 and insert them into the Third Stack.
Display the contents of all the 3 Stacks.