Answered You can hire a professional tutor to get the answer.

QUESTION

Please Provide me all necessary Screen short and Comments:

Please Provide me all necessary Screen short and Comments:(I use eclipse)

For this program, I will describe the goal of the program, the (lack of) input, the rules of the system, your choice of algorithms, the (short) report I'd like you to write, the output that I expect, and the grading rubric.

Goal:

Imagine that you have an AA degree in some subject that required you to take no math and no computer courses, and you decide to come to Metro and get a Computer Science degree. It is possible to complete a CS degree in seven semesters if you take 3 courses per semester (in fact, you will have two courses to space, since there are 19 courses required for the degree).

Your goal is to use local search to come out with a schedule that has you completing the coursework in seven semesters.

Input:

There is no actual "input" to this program. . The set of courses that you must take is given below, along with the prerequisites of each course. Since you have an AA degree, you have met your General Education (but not Liberal Studies) requirements. So you need to do Math, ICS, and two Liberal Studies courses.

Rules to Complete CS Degree:

Courses:

For the purposes of this assignment, to complete a CS degree you must take the following courses. You can hard-code this set of rules into your program:

Math: 120, 210, 215

ICS: 140, 141, 232, 240, 311, 340, 365, 372, 440, 460, 462, 490, 492, 499

Liberal Studies: 998, 999

Notes:

For a CS degree you need two electives, I am calling them ICS 490 and ICS 492[1]

Since there are a bunch of Liberal Studies courses available, I just assume these generic numbers "998" and "999".

Since the numbers of the math, ICS, and liberal studies courses are disjoint, for the purposes of this program it's sufficient to refer to a course by its number without a subject designator, and there will be no confusion.

Prerequisites:

Of course, to take a course, you need to take its prerequisites. This is what makes this assignment fun! The prerequisites can also be hardcoded into your program. They are of two types:

n1 < n2 means that course n1 must be taken before course n2.

n1 ≤ n2 means that course n1 must be taken before, or concurrently with, course n2.

Here are the prerequisites: You may embed this list in your program. (The order in which I list the prerequisites isn't important, the order is just the way I looked at them, basically math first, then ICS.)

120 < 210

120 < 215

120 ≤ 140

215 ≤ 141

140 < 141

141 < 232

141 < 240

141 < 311

240 < 311

240 < 340

240 < 365

240 < 372

340 < 440

372 < 499

All seven courses at the 100- and 200-level (120, 210, 215, 140, 141, 232, 240) must be taken before any course at the 400-level can be taken.

Additional Constraints:

You may take no more than 3 courses per semester.

499 must be taken in the final semester.

Liberal Studies courses can be taken any time.

Semesters are numbered 1-7. Semesters 1, 4, and 7 are summers. That is important in the constraints that follow. All courses are offered every semester except for the following:

ICS 490 is never offered in the summer.

ICS 492 is only offered in the summer.

Algorithm:

Start with a random assignment of courses to semesters, using the java Random class to select such a random assignment. Then look for conflicts. If there are no conflicts, you are done. If there are conflicts, then you should change the values of one or more courses following a Local Search strategy (or combination of such strategies) from section 4.8.

You get to choose which strategy(ies) to follow. The only rules are that they need to be local search strategies (no constraint satisfaction or anything like that), and they need to be done without any human interaction. For instance, it's always possible that you might get stuck and want to make a random move of some sort to get the local search to progress. Your algorithm has to decide when to make such a random move, and whether it should be a random walk or a random restart. Explain your rule for randomness if you have one; maybe you use simulated annealing, maybe you use something else. But explain it.

Basically, your algorithm should implement the local search meta-algorithm from Figure 4.6:

1: Procedure Local-Search(V,dom,C)

2:          Inputs

3:                    V: a set of variables

4:                    dom: a function such that dom(X) is the domain of variable X

5:                    C: set of constraints to be satisfied

6:          Output

7:                    complete assignment that satisfies the constraints

8:          Local

9:                    A[V] an array of values indexed by V

10:          repeat

11:                    for each variable X do

12:                              A[X] ←a random value in dom(X);

13:                    while (stopping criterion not met & A is not a satisfying assignment)

14:                              Select a variable Y and a value V ∈dom(Y)

15:                              Set A[Y] ←V

16:                    if (A is a satisfying assignment) then

17:                              return A

18:          until termination

Output File

Offer the user two choices of output mode: Summary and Verbose.

In summary mode, print out the seven semesters to a file with the course numbers for a given semester on each row. Here is one possible summary output:

Summer: 120 140

Autumn: 215 141 998

Spring: 240 232 311

Summer: 340 365 210

Autumn: 372 998 490

Spring: 440 460 462

Summer: 999 499 492

In verbose mode, print the proposed semester for each course on one line, with courses in numerical order without regard for department. Each course should take up one digit for the semester and have one space between courses. So it might look something like this, assuming a header line.

In this case, I chose in the first iteration to change the term of course 460, then in the second iteration I chose to change 140, then in the third iteration I did a random restart.

You will need to write this into a text file, because there will probably be thousands of iterations of the program.

Report:

In addition to the comments on your code, you should document the design decisions you made for the program in a report. In this report, you should say what your overall algorithm was. That is, which of the strategies from chapter 4.8 of the Poole text are you using? Does your algorithm contain any randomness? If so, when and how is the randomness used? If not, how to you avoid getting into local minima and getting "stuck"? Do you use a tabu list? If so, how long a list? Why did you make this choice?

General Info:

As always, the program must be written in Java and must run on the University Windows computer systems. (This means use only Oracle Java 8 SE and earlier constructs, and test it on the University systems before submission if you have any doubts about its ability to run on Windows).

Submit the Java source code to the Program C dropbox.

Ideally, the test file will be in the same directory as the source code to make user navigation simple.

Grading: Since this program doesn't have input, the grading is a little different than before.

Category

Description

Compilation and execution

Does the program compile and run? To what extent does it attempt to do what the problem assignment asks for?

Correctness

Measures how correct the work of the student is. Example: Does it eventually halt, or at least do a reasonable set of random walks and/or restarts to try to do so?

Design

Evaluation of the design - is it done properly? does it make sense? This includes ideas like the division of the program into classes and methods. (Note: This does not include the question of which local search strategies to use, that's under "report" - although how well you implement those decisions is part of the design.)

Clarity

Measurement of how well the design is implemented. Did the student follow good programming practices? Can the instructor understand what a given piece of code is trying to accomplish?

Also, how effective are the program's comments and documentation? This includes choices that you may have made concerning the user interface, if they don't impact correctness.

Report

Is your report accurate? Understandable? Does it explain what you tried to do and why you tried to do it?

Design:

I have a few additional notes on design.

I don't think that this is a tough assignment to code, it's just doing some algebraic calculations to identify conflicts and then choosing which course to modify at each iteration. When you're doing randomness, you need to compute random integers in the range of 1-7, inclusive.

But the hard part here is design.  There are a few points that I want you to think about.

Decide on your preferred strategy before you start coding (e.g., which of the local search algorithms to use, where to apply randomness, whether to use tabu lists, etc.). I'm not saying any one strategy is better than any other (I don't know, honestly), but start out with a strategy in mind.

Use of proper data structures is really key here. How do you want to keep the current list of the courses and their proposed semesters so that they are easy to manipulate? You may want to find the course with the most conflicts (or not). How will you efficiently do this? If you want to keep a tabu list, is there an efficient way to do so (or is it such a pain, and such an unlikely occurrence, that you just skip it).

I mentioned that the rules can be "hardcoded" or "embedded" in the program. What's the best way to do this? It's good to have something that's cleanly designed. Think about how to represent a rule in the system.

[1] Of course, as you probably know, you can also take any upper-division math course for an elective - but since you didn't have any math, and since all upper division math requires Calculus II, this would cost you an extra course. You probably also know that you could do an internship instead of one of the elective courses, but this program doesn't allow that. Finally, of course, you can use other ICS courses for electives if you meet the prerequisites, such as ICS 325, 382, or 425.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question