Skip to content

ucsb-cs56-pconrad/cs56-rational-ex01

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository is part of a series of Java tutorials for a Rational class written by Phill Conrad for CMPSC 56, a Java course taught in the Dept. of Computer Science at UC Santa Barbara.

For detailed instructions, see:

Previous Repo This Repo Next Repo
  cs56-rational-ex01 cs56-rational-ex02

Quick start

Once you clone this repo, these commands show how to compile and run the code inside.

-bash-4.3$ ls
Main.java  Rational.java  README.md
-bash-4.3$ javac Main.java
-bash-4.3$ ls
Main.class  Main.java  Rational.class  Rational.java  README.md
-bash-4.3$ javac Rational.java
-bash-4.3$ ls
Main.class  Main.java  Rational.class  Rational.java  README.md
-bash-4.3$ java Main
Usage: java Main int denom
  int and denom should be integers; denom may not be zero.
-bash-4.3$ java Main 3 4
r1 = Rational@2a139a55
r2 = Rational@15db9742
-bash-4.3$

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages