Code Monkey home page Code Monkey logo

os's Introduction

OS-Simulation

OPERATING SYSTEM PROJECT IN JAVA

Since Java is a totally object-oriented language, all method calls whose definitions are outside the calling class must be preceded by the object name, or the class name if the method is static. In this case, all methods you will need to call are static. Since the class in 'sos.class' is called sos (the public class must be the same as the file name), you will have to call my methods in the following way:

sos.ontrace();

sos.offtrace();

sos.siodisk(...);

sos.siodrum(...);

My main calls some of your methods in a similar way. Therefore, you must call your public class os and therefore your file must be called 'os.java'. You should use the following headers:

public static void Crint (int []a, int []p)

public static void Dskint (int []a, int []p)

public static void Drmint (int []a, int []p)

public static void Tro (int []a, int []p)

public static void Svc (int []a, int []p)

The first variable, 'a' is declared as an array with only one element, since basic types may not be changed within a method. Access this value as 'a[0]'. Any other methods you write that are called from within these will also have to be static.

Since sos does not create an object of type os and call its constructor, you must call your constructor inside startup, so that everything can be initialized. If you would like to write an interface, it should be called here, too.

To run the program from the command line:

Copy sos.class, jobtype.class and Format.class into your directory. javac *.java (compile all your necessary Java files) java sos (run my program) The 'sos.class' file and other .class files may be used in DOS, Windows, UNIX and MacOS, since the Java Virtual Machine will interpret the bytecode in the correct way for that machine. Java's type sizes are the same for all machines (i.e. an int is the same size on the PC as on a Sun), so you don't have to change everything to long if you will be doing it on a PC.

os's People

Contributors

shangsunset avatar manuelleung avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.