In this part, you need to discuss in detail the three following topics:
You must discuss each topic in terms of concepts, issues, solutions, usage, real work examples, etc.
In the implementation part, you must implement the pervious discussed topics in Java:
Note:
You must screenshot and illustrate your results for each part/topic. You also must submit your Java codes on the Blackboard.
Topic 1 – File Management:
You are given a text file “namesList,” which contains a list of names. You need to read the file, store the names in a list, and then count the number of each name (Ahmed Ali, and Muhammad). Next, you need to create a new text file using Java, order the names alphabetically, and print the name to the new created file named “newNameList.”
Hint 1:
You can read the file using Java built-in classes (e.g., BufferedReader class, Scanner class. File Reader class). To read the file, you must do the following
List<String> list = new ArrayList<>();
for(int i = 0; i < 5; i++){ System.out.println(i);}
Topic 2 – Memory Management:
As memory in any operating system is a scarce resource (limited capacity), programmers must be able to write a code that uses the memory efficiently to improve application performance. In this topic, you must illustrate the following:
There are many memories monitoring tools that you can use to view and visualize memory and CPU utilization (e.g., VisualVM). Use a tool of your choice to show memory usage statistics you obtain from running/executing your bad and good codes.
The following tutorial might be very helpful:
https://www.youtube.com/watch?v=pRwvx4QpUfo
https://www.youtube.com/watch?v=AHLkbqcVLvY&t=404s
Topic/question 3: Threads or Task Scheduling
In this topic, you can choose to implement either thread techniques or task scheduling. Note, we discussed threads and process scheduling in slides week 3 & 4.
Threads (choice 1):
Threads can be used to make your Java applications faster. They allow you to run multiple things at the same time. You must think of a good scenario for using threads in real-world, and then implement the scenario in Java. You must discuss your scenario. To create a thread in Java, you can either:
You can follow the below steps to create threads:
Task Scheduling (choice 2):
A single-core CPU executes its processes/tasks one by one based on a given scheduling criteria. Let us say that we have more than one task to be executed. We learned that for any task to be executed, it must be put into a Ready queue. The CPU must choose which task to execute first. As such, you are asked to code two task scheduling algorithms. The first algorithm is First come first serve (FCFS). You must screenshot and illustrate your results. The second algorithm would be either:
Choose one from the two above algorithms (1 or 2). For simulating/creating tasks, you can use a factorial function or a Fibonacci sequence function. You can follow the below steps to do the ask scheduling:
You will present your project in class. You must create PowerPoint slides that summarize your work. For each group, all student members must present part of the work.
In this part, you need to discuss in detail the three following topics:
You must discuss each topic in terms of concepts, issues, solutions, usage, real work examples, etc.
In the implementation part, you must implement the pervious discussed topics in Java:
Note:
You must screenshot and illustrate your results for each part/topic. You also must submit your Java codes on the Blackboard.
Topic 1 – File Management:
You are given a text file “namesList,” which contains a list of names. You need to read the file, store the names in a list, and then count the number of each name (Ahmed Ali, and Muhammad). Next, you need to create a new text file using Java, order the names alphabetically, and print the name to the new created file named “newNameList.”
Hint 1:
You can read the file using Java built-in classes (e.g., BufferedReader class, Scanner class. File Reader class). To read the file, you must do the following
List<String> list = new ArrayList<>();
for(int i = 0; i < 5; i++){ System.out.println(i);}
Topic 2 – Memory Management:
As memory in any operating system is a scarce resource (limited capacity), programmers must be able to write a code that uses the memory efficiently to improve application performance. In this topic, you must illustrate the following:
There are many memories monitoring tools that you can use to view and visualize memory and CPU utilization (e.g., VisualVM). Use a tool of your choice to show memory usage statistics you obtain from running/executing your bad and good codes.
The following tutorial might be very helpful:
https://www.youtube.com/watch?v=pRwvx4QpUfo
https://www.youtube.com/watch?v=AHLkbqcVLvY&t=404s
Topic/question 3: Threads or Task Scheduling
In this topic, you can choose to implement either thread techniques or task scheduling. Note, we discussed threads and process scheduling in slides week 3 & 4.
Threads (choice 1):
Threads can be used to make your Java applications faster. They allow you to run multiple things at the same time. You must think of a good scenario for using threads in real-world, and then implement the scenario in Java. You must discuss your scenario. To create a thread in Java, you can either:
You can follow the below steps to create threads:
Task Scheduling (choice 2):
A single-core CPU executes its processes/tasks one by one based on a given scheduling criteria. Let us say that we have more than one task to be executed. We learned that for any task to be executed, it must be put into a Ready queue. The CPU must choose which task to execute first. As such, you are asked to code two task scheduling algorithms. The first algorithm is First come first serve (FCFS). You must screenshot and illustrate your results. The second algorithm would be either:
Choose one from the two above algorithms (1 or 2). For simulating/creating tasks, you can use a factorial function or a Fibonacci sequence function. You can follow the below steps to do the ask scheduling:
You will present your project in class. You must create PowerPoint slides that summarize your work. For each group, all student members must present part of the work.
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more