Please put your work in directory cs201 on your Linux account before 11:59pm of the day above.
This is an extra credit assignment. Successful completion of any of these projects will increase your total score in this class on 3 points. "Successful completion" means that that you program has to compile and produce correct results. No partial credits will be issued. You have to do it strictly individually as an exam task, no group work or discussion is allowed.
No late submission for this assignment
Name the source file Hw8_1.java
Solution
You can store the integers as ASCII strings with up to 40 digits and use the "school algorithms" for operating with them digit by digit. Think on the folloiwng example showing how to use the school methods to add and subtract two numbers:
925 925 + 718 - 718 ----- ----- 1643 207
Name the source file Hw8_2.java
Solution
For example, for n=5 the following sequences should be output (not necessarily in the shown order):
1 5 1 2 5 1 3 5 1 2 3 5 1 4 5 1 2 4 5 1 3 4 5 1 2 3 4 5
You can generate those sequences recursively according to the last-but-one entry as in the above table. The first sequence is a particular one and can be served as a termination condition for the recursion. The second sequence has 2 as the last-but-one entry, the next two sequences have 3 as the last-but-one entry and the remaining ones have 4 as that entry.
Name the source file Hw8_3.java
Solution
Name the source file Hw8_4.java. Place the HTML file Hw9_4.html in your public_html folder.