-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassignmenttest.j
executable file
·96 lines (85 loc) · 1.78 KB
/
assignmenttest.j
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
.class public assignmenttest
.super java/lang/Object
.field private static _runTimer LRunTimer;
.field private static _standardIn LPascalTextIn;
.field private static centigrade F
.field private static fahrenheit F
.field private static freezing Z
.field private static ratio F
.field private static tempc I
.field private static tempf I
.method public <init>()V
aload_0
invokenonvirtual java/lang/Object/<init>()V
return
.limit locals 1
.limit stack 1
.end method
.method public static main([Ljava/lang/String;)V
new RunTimer
dup
invokenonvirtual RunTimer/<init>()V
putstatic assignmenttest/_runTimer LRunTimer;
new PascalTextIn
dup
invokenonvirtual PascalTextIn/<init>()V
putstatic assignmenttest/_standardIn LPascalTextIn;
.line 9
bipush 72
dup
iconst_0
sipush 200
invokestatic RangeChecker/check(III)V
putstatic assignmenttest/tempf I
.line 10
bipush 25
dup
iconst_0
sipush 200
invokestatic RangeChecker/check(III)V
putstatic assignmenttest/tempc I
.line 11
ldc 5.0
ldc 9.0
fdiv
putstatic assignmenttest/ratio F
.line 13
getstatic assignmenttest/tempf I
putstatic assignmenttest/fahrenheit F
.line 14
getstatic assignmenttest/fahrenheit F
bipush 32
i2f
fsub
getstatic assignmenttest/ratio F
fmul
putstatic assignmenttest/centigrade F
.line 16
getstatic assignmenttest/tempc I
putstatic assignmenttest/centigrade F
.line 17
bipush 32
i2f
getstatic assignmenttest/centigrade F
getstatic assignmenttest/ratio F
fdiv
fadd
putstatic assignmenttest/fahrenheit F
.line 19
getstatic assignmenttest/fahrenheit F
bipush 32
i2f
fcmpg
iflt L001
iconst_0
goto L002
L001:
iconst_1
L002:
putstatic assignmenttest/freezing Z
getstatic assignmenttest/_runTimer LRunTimer;
invokevirtual RunTimer.printElapsedTime()V
return
.limit locals 1
.limit stack 4
.end method