Assignment 1 Mac OS

Assignment 2 starts the transformation of OS/161 into a true multi-tasking operating system. After the next assignment, it will be capable of running multiple processes at once from actual compiled programs stored in your account. Question No 1 Discuss the history of various operating systems (Windows, Linux, Mac, etc.) including their era, requirements, features, and shortcomings. Answer An operating system is a program that acts as an interface between the user and the computer hardware and controls the execution of all kinds of programs. Every computer system must have at least one operating system to run other programs. This assignment must be completed on the mark-reading sheet supplied. Ark-reading M sheets may be submitted either by post or electronically via. Please refer to the myUnisa myStudies@Unisa brochure on how to use and complete a mark-reading sheet. For information onhow to submit an assignment through refer myUnisato paragraph 6.6 of.

  1. Mac Os Download
  2. Assignment 1 Mac Os Download
  3. Assignment 1 Mac Os Download
  4. Assignment 1 Mac Os 11

Programming Assignment 1 Checklist: Percolation


Frequently Asked Questions (General)

What's a checklist?The assignment provides the programming assignment specification;the checklist provides clarifications, test data, and hints that might behelpful in completing the assignment.

Mac Os Download

Where can I find the course policies regardingsubmission, lateness, grading, and collaboration?Please read the Assignments Page.

I haven't programmed in Java in a while. What material do I need to remember?For a review of our Java programming model (including our input and output libraries),read Sections 1.1 and 1.2 of Algorithms, 4th Edition.

Which Java programming environment should I use?We recommend the lightweight IDE DrJavaalong with the command line.If you use our Mac OS X or Windows installer, then everything should beconfigured and ready to go.If you prefer use another IDE (such as Eclipse), that's perfectly fine—besure that you can use command-line arguments, read from standard input,redirect standard input and output, and add stdlib.jar and algs4.jarto your Java classpath.

What are the input and output libraries?We have designed a set of easy-to-use Java libraries in stdlib.jar for input and outputthat you are required to use in this course.Here are the APIs.

While you are required to throw exceptions using throw statements as specified,you should not catch exceptions with try-catch statements—this will interferewith our grading scripts.

What should I put in my readme.txt file?Here is a readme guide.

When I try to submit files I get a message telling me 'No Login found in header of file.' How do I fix this?At the top of each Java file, include a header in format described in the readme guide.

How should I format and comment my code?Here are some recommended style guidelines.Below are some that are particularly important (and for which you will lose points if you ignore).

  • Include a bold (or Javadoc)comment at the beginning of each Java file with your name, login, precept,date, the purpose of the program, and how to compile and execute it.
  • Include a comment describing every method and class (whether public or private).
  • Include a comment describing every instance variable (including those for nested classes).
  • Indent consistently, using 3 or 4 spaces for each indentation level.Do not use hard tabs.
  • Do not exceed 80 characters per line. This rule also applies to thereadme.txt file.
  • Avoid unexplained magic numbers, especially ones that are usedmore than once.

What is unit testing? It is testing of each method within a class.Ideally, it should be comprehensive enough to catch any error in the class.

What's the easiest way to copy a subdirectory from theCOS 226 ftp siteto my computer?

  • Safari.Click the ftp link above to mount the ftp site, then drag-and-dropthe percolation folder from the ftp mount to the desired location.If prompted for a name and password, choose to Connect as a Guestinstead of a Register user.
  • Firefox.Install the DownThemAll! pluginto support downloading all of the links contained in a webpage and use it.
  • Internet Explorer. Click the ftp link above,then click Page and select Open FTP Site in Windows Explorerfrom the dropdown menu.Drag the desired folder to your desktop.
  • Linux or OS X command line.From the Linux or OS X command line, type ftp ftp.cs.princeton.edu;enter anonymous for your username and your email address for yourpassword; type cd pub/cs226 to get to the root of the cs226 ftp site.
  • Ftp client. Using your favorite ftp client, go toftp.cs.princeton.edu/pub/cs226,enter anonymous for your username and your email address for yourpassword, and navigate to the pub/cs226 subdirectory.

Frequently Asked Questions (Percolation)

What are the goals of this assignment?

  • Set up a Java programming environment.
  • Use our input and output libraries.
  • Learn about a scientific application of the union–find data structure.
  • Measure the running time of a program and use the doubling hypothesisto make predictions.
  • Measure the amount of memory used by a data structure.

Can I add (or remove) methods to (or from) Percolation or PercolationStats?No. You must implement the APIs exactly as specified, with the identical set of public methods and signatures (or you will receive a substantial deduction).However, you are encouraged to add private methods that enhance the readability, maintainability,and modularity of your program.The one exception is main()—you are always permitted toadd this method to test your code, but the autograder will call itonly if we instruct you to include it and specify its behavior.

Why is it so important to implement the prescribed API?Writing to an API is an important skill to master because it is an essential component of modular programming,whether you are developing software by yourself or as part of a group. When you develop a module that properly implements an API, anyone using that module (including yourself, perhaps at some later time) does not need to revisit the details of thecode for that module when using it.This approach greatly simplifies writing large programs, developing software as part of a group, or developing software for use by others.

Most important, when you properly implement an API, others can writesoftware to use your module or to test it.We do this regularly when grading your programs. For example,your PercolationStats client should work with ourPercolation data type and vice versa. If you add an extra publicmethod to Percolation and call them from PercolationStats,then your client won't work with our Percolation data type.Conversely, our PercolationStats client may not work with your Percolation data type if you remove a public method.

How many lines of code should my program be?You should strive for clarity and efficiency. Our reference solution forPercolation.java is about 80 lines, plus a test client.Our PercolationStats.java client is about 60 lines.If you are re-implementing the union-find data structure(instead of reusing the implementations provided), you are on the wrong track.

What should stddev() return if T equals 1?The sample standard deviation is undefined. We recommend returning Double.NaNbut we will not test this case.

After the system has percolated, PercolationVisualizer colors in light blueall sites connected to open sites on the bottom (in addition to those connected to open siteson the top). Is this 'backwash' acceptable?No, this is likely a bug in your Percolation. It is only a minor deduction, so don'tgo crazy trying to get this detail.

How do I generate a site uniformly at random among all blocked sitesfor use in PercolationStats?Pick a site at random (by using StdRandom to generate twointegers between 0 (inclusive) and N (exclusive) and use this siteif it is blocked; if not, repeat.

I don't get reliable timing information in PercolationStats when N = 200.What should I do?Increase the size of N (say to 400, 800, and 1600), untilthe mean running time exceeds its standard deviation.


Assignment 1 mac os catalina
Style and Bug Checkers

Style checker.We recommend using Checkstyle 5.5(and the configuration filecheckstyle.xml)to check the style of your Java programs.Here is a list of available Checkstyle checks.

Bug checker.We recommend using FindBugs 2.0.3 (and the configuration file findbugs.xml)to identify common bug patterns in your code.Here is a summary of FindBugsBug descriptions.

Mac OS X and Windows installer.If you used our Mac OS X or Windows installer, these programs are already installedas command-line utilities.You can check a single file or multiple files via the commands:

Note that Checkstyle inspects the source code; Findbugs inspects the compiled code.

Eclipse.For Eclipse users,there is a Checkstyle pluginfor Eclipseand a Findbugs plugin for Eclipse.

Caveat.The appearance of a warning message does not necessarily lead toa deduction (and, in some cases, it does not even indicate an error).


Testing
Assignment 1 Mac OS

Testing.We provide two clients that serve as large-scale visual traces.We highly recommend using them for testing and debugging your Percolation implementation.

Assignment 1 Mac Os Download

Visualization client.PercolationVisualizer.javaanimates theresults of opening sites in a percolation system specified by a file by performing the following steps:

  • Read the grid size N from the file.
  • Create an N-by-N grid of sites (initially all blocked).
  • Read in a sequence of sites (row i, column j) to open from the file.After each site is opened, draw full sites in light blue, open sites (that aren't full) in white, andblocked sites in black using standard draw, with site (0, 0) in the upper left-hand corner.
The program should behave as in this movie and the following snapshotswhen used with input20.txt.

50 open sites

100 open sites

150 open sites

204 open sites

250 open sites

Sample data files.The directorypercolationcontains some sample files for use with the visualization client.Associated with most input .txt file is an output .png file that contains thedesired graphical output at the end of the visualization.

InteractiveVisualization client.InteractivePercolationVisualizer.javais similarto the first test client except that the input comes from a mouse (instead of from a file).It takes a command-line integer N that specifies the grid size.As a bonus, it writes to standard output the sequence of sites opened in the same format used byPercolationVisualizer, so you can use it to prepare interesting files for testing.If you design an interesting data file, feel free to share it with us and your classmates by posting itin the discussion forums.

Assignment 1 Mac Os Download


Assignment 1 Mac Os 11

Possible Progress Steps