Assignment 8 Solutions | Introduction to Computing - Java | CSC 116, Assignments of Java Programming

Material Type: Assignment; Class: Introduction to Computing - Java; Subject: Computer Science; University: North Carolina State University; Term: Spring 2005;

Typology: Assignments

Pre 2010

Uploaded on 03/10/2009

koofers-user-3xy
koofers-user-3xy ๐Ÿ‡บ๐Ÿ‡ธ

5

(2)

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
๎˜๎˜‚๎˜๎˜ƒ๎˜„๎˜„๎˜…๎˜ƒ๎˜†๎˜ƒ๎˜‡๎˜‡๎˜ˆ๎˜ƒ๎˜‰๎˜Š๎˜‹๎˜Œ๎˜๎˜Ž๎˜๎˜๎˜ƒ๎˜๎˜‘๎˜’๎˜“๎˜Œ๎˜”๎˜๎˜’๎˜ƒ๎˜•๎˜ƒ๎˜–๎˜ƒ
๎˜ƒ
๎˜—๎˜Ž๎˜˜๎˜’๎˜™๎˜ƒ๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜‚๎˜›๎˜๎˜œ๎˜๎˜”๎˜›๎˜Š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜ƒ๎˜ž๎˜Š๎˜”๎˜๎˜Ÿ๎˜ƒ๎˜‰ ๎˜™๎˜ƒ๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜ƒ!๎˜Ž"๎˜™๎˜ƒ๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜š๎˜ƒ
๎˜ƒ
#๎˜“๎˜”๎˜๎˜’๎˜ƒ$๎˜ƒ๎˜๎˜’๎˜๎˜๎˜ƒ๎˜Œ๎˜Ž๎˜๎˜’๎˜๎˜ƒ๎˜๎˜›๎˜ƒ๎˜๎˜’๎˜๎˜๎˜ƒ๎˜%๎˜’๎˜ƒ&๎˜›๎˜๎˜๎˜›'๎˜”๎˜Š(๎˜ƒ๎˜๎˜Ÿ๎˜๎˜๎˜’๎˜˜)๎˜ƒ๎˜ƒ๎˜ž๎˜๎˜’๎˜ƒ๎˜%๎˜’๎˜ƒ๎˜๎˜Ž"๎˜๎˜’๎˜ƒ(๎˜”*๎˜’๎˜Š๎˜ƒ"๎˜’๎˜๎˜›'๎˜ƒ๎˜๎˜›๎˜ƒ๎˜“๎˜’๎˜Œ๎˜›๎˜“+๎˜ƒ๎˜Ÿ๎˜›๎˜œ๎˜“๎˜ƒ
๎˜๎˜’๎˜๎˜๎˜ƒ๎˜Œ๎˜Ž๎˜๎˜’๎˜)๎˜ƒ๎˜ƒ,'๎˜›๎˜ƒ๎˜๎˜’๎˜๎˜๎˜ƒ๎˜Œ๎˜Ž๎˜๎˜’๎˜๎˜ƒ'๎˜”๎˜๎˜๎˜ƒ๎˜๎˜’๎˜๎˜๎˜ƒ๎˜%๎˜’๎˜ƒ๎˜’-๎˜œ๎˜”*๎˜Ž๎˜๎˜’๎˜Š๎˜Œ๎˜’๎˜ƒ๎˜Œ๎˜๎˜Ž๎˜๎˜๎˜’๎˜๎˜ƒ๎˜Ž๎˜Š+๎˜ƒ๎˜%๎˜“๎˜’๎˜’๎˜ƒ'๎˜”๎˜๎˜๎˜ƒ๎˜๎˜’๎˜๎˜๎˜ƒ๎˜%๎˜’๎˜ƒ
"๎˜›๎˜œ๎˜Š+๎˜Ž๎˜“๎˜Ÿ)๎˜ƒ
๎˜ƒ
.๎˜›๎˜œ๎˜ƒ%๎˜Ž*๎˜’๎˜ƒ"๎˜’๎˜’๎˜Š๎˜ƒ๎˜Ž๎˜/๎˜’+๎˜ƒ๎˜๎˜›๎˜ƒ'๎˜“๎˜”๎˜๎˜’๎˜ƒ๎˜%๎˜’๎˜ƒ๎˜๎˜›&๎˜'๎˜Ž๎˜“๎˜’๎˜ƒ๎˜”๎˜Š๎˜ƒ๎˜Ž๎˜Š๎˜ƒ๎˜Ž๎˜œ๎˜๎˜›๎˜˜๎˜Ž๎˜๎˜”๎˜Œ๎˜ƒ๎˜๎˜”๎˜Œ/๎˜’๎˜๎˜”๎˜Š(๎˜ƒ๎˜˜๎˜Ž๎˜Œ%๎˜”๎˜Š๎˜’๎˜ƒ๎˜%๎˜Ž๎˜๎˜ƒ
0%๎˜›๎˜๎˜›(๎˜“๎˜Ž0%๎˜๎˜ƒ๎˜%๎˜’๎˜ƒ๎˜๎˜”๎˜Œ๎˜’๎˜Š๎˜๎˜’๎˜ƒ0๎˜๎˜Ž๎˜๎˜’๎˜๎˜ƒ๎˜›&๎˜ƒ๎˜0๎˜’๎˜’+๎˜”๎˜Š(๎˜ƒ*๎˜’%๎˜”๎˜Œ๎˜๎˜’๎˜)๎˜ƒ๎˜ƒ,%๎˜’๎˜ƒ๎˜0๎˜’๎˜’+๎˜ƒ๎˜๎˜”๎˜˜๎˜”๎˜๎˜ƒ๎˜›&๎˜ƒ๎˜%๎˜’๎˜ƒ๎˜“๎˜›๎˜Ž+๎˜ƒ๎˜%๎˜’๎˜ƒ
๎˜˜๎˜Ž๎˜Œ%๎˜”๎˜Š๎˜’๎˜ƒ๎˜”๎˜๎˜ƒ๎˜๎˜›๎˜Œ๎˜Ž๎˜๎˜’+๎˜ƒ๎˜›๎˜Š๎˜ƒ๎˜”๎˜๎˜ƒ1$๎˜ƒ๎˜˜0%2๎˜ƒ"๎˜œ๎˜๎˜ƒ๎˜%๎˜’๎˜ƒ๎˜˜๎˜Ž๎˜Œ%๎˜”๎˜Š๎˜’๎˜ƒ๎˜Ž๎˜๎˜๎˜›'๎˜๎˜ƒ&๎˜›๎˜“๎˜ƒ๎˜Ž๎˜ƒ๎˜Œ๎˜Ž๎˜“๎˜ƒ๎˜๎˜›๎˜ƒ(๎˜›๎˜ƒ๎˜Ž๎˜๎˜ƒ๎˜˜๎˜›๎˜๎˜๎˜ƒ๎˜„๎˜‡๎˜ƒ๎˜˜0%๎˜ƒ
๎˜›*๎˜’๎˜“๎˜ƒ๎˜%๎˜’๎˜ƒ๎˜0๎˜’๎˜’+๎˜ƒ๎˜๎˜”๎˜˜๎˜”๎˜)๎˜ƒ๎˜ƒ๎˜‚๎˜›๎˜ƒ๎˜”&๎˜ƒ๎˜Ž๎˜ƒ๎˜Œ๎˜Ž๎˜“๎˜ƒ๎˜”๎˜๎˜ƒ(๎˜›๎˜”๎˜Š(๎˜ƒ3$๎˜ƒ๎˜˜0%๎˜ƒ๎˜›๎˜“๎˜ƒ๎˜๎˜’๎˜๎˜2๎˜ƒ๎˜%๎˜’๎˜ƒ+๎˜“๎˜”*๎˜’๎˜“๎˜ƒ+๎˜›๎˜’๎˜๎˜ƒ๎˜Š๎˜›๎˜๎˜ƒ๎˜“๎˜’๎˜Œ๎˜’๎˜”*๎˜’๎˜ƒ๎˜Ž๎˜ƒ
๎˜๎˜”๎˜Œ/๎˜’๎˜)๎˜ƒ๎˜ƒ๎˜‰&๎˜ƒ๎˜%๎˜’๎˜ƒ๎˜Œ๎˜Ž๎˜“๎˜ƒ๎˜‰๎˜ƒ(๎˜›๎˜”๎˜Š(๎˜ƒ&๎˜Ž๎˜๎˜๎˜’๎˜“๎˜ƒ๎˜%๎˜Ž๎˜Š๎˜ƒ3$๎˜ƒ๎˜˜0%2๎˜ƒ๎˜%๎˜’๎˜ƒ+๎˜“๎˜”*๎˜’๎˜“๎˜ƒ+๎˜›๎˜’๎˜๎˜ƒ๎˜“๎˜’๎˜Œ๎˜’๎˜”*๎˜’๎˜ƒ๎˜Ž๎˜ƒ๎˜๎˜”๎˜Œ/๎˜’๎˜)๎˜ƒ
๎˜ƒ
,๎˜’๎˜๎˜๎˜ƒ๎˜๎˜Ž๎˜๎˜’๎˜ƒ๎˜‰ ๎˜ƒ ๎˜’๎˜๎˜Œ๎˜“๎˜”0๎˜๎˜”๎˜›๎˜Š๎˜ƒ ๎˜๎˜‘0๎˜’๎˜Œ๎˜๎˜’+๎˜ƒ4๎˜’๎˜๎˜œ๎˜๎˜๎˜๎˜ƒ 5๎˜Œ๎˜๎˜œ๎˜Ž๎˜๎˜ƒ4๎˜’๎˜๎˜œ๎˜๎˜๎˜๎˜ƒ
๎˜
๎˜‚๎˜ƒ๎˜„๎˜…๎˜†๎˜‡๎˜ˆ๎˜
๎˜ƒ
๎˜‚0๎˜’๎˜’+๎˜ƒ6๎˜ƒ๎˜‰๎˜Š๎˜ƒ
๎˜ƒ
๎˜ƒ
,๎˜”๎˜Œ/๎˜’๎˜7๎˜ƒ๎˜‹๎˜„๎˜ƒ
๎˜ƒ
๎˜
๎˜Œ๎˜‡๎˜‚๎˜๎˜†๎˜‡๎˜ˆ๎˜
๎˜ƒ
๎˜‚0๎˜’๎˜’+๎˜ƒ6๎˜ƒ๎˜Ž๎˜Š๎˜ƒ
๎˜ƒ
๎˜ƒ
,๎˜”๎˜Œ/๎˜’๎˜7๎˜ƒ๎˜๎˜๎˜‚๎˜ƒ
๎˜ƒ
๎˜
๎˜‘๎˜„๎˜๎˜’๎˜“๎˜”๎˜๎˜๎˜•๎˜–๎˜๎˜๎˜—๎˜”๎˜‘๎˜˜
๎˜
๎˜ƒ
๎˜‚0๎˜’๎˜’+๎˜ƒ6๎˜ƒ๎˜™๎˜™๎˜ƒ
๎˜ƒ
๎˜ƒ
,๎˜”๎˜Œ/๎˜’๎˜7๎˜ƒ๎˜‹๎˜„๎˜ƒ
๎˜ƒ
๎˜
๎˜‚๎˜–๎˜๎˜๎˜—๎˜š๎˜”๎˜›๎˜”๎˜๎˜
๎˜ƒ
๎˜‚0๎˜’๎˜’+๎˜ƒ6๎˜ƒ๎˜™๎˜œ๎˜ƒ
๎˜ƒ
๎˜ƒ
,๎˜”๎˜Œ/๎˜’๎˜7๎˜ƒ๎˜‹๎˜„๎˜ƒ
๎˜ƒ
๎˜
๎˜๎˜“๎˜‚๎˜๎˜•๎˜–๎˜๎˜๎˜—๎˜”๎˜‘๎˜˜๎˜
๎˜ƒ
๎˜‚0๎˜’๎˜’+๎˜ƒ6๎˜ƒ๎˜™๎˜Ž๎˜ƒ
๎˜ƒ
๎˜ƒ
,๎˜”๎˜Œ/๎˜’๎˜7๎˜ƒ๎˜๎˜๎˜‚๎˜ƒ
๎˜ƒ
๎˜ƒ
๎˜

Partial preview of the text

Download Assignment 8 Solutions | Introduction to Computing - Java | CSC 116 and more Assignments Java Programming in PDF only on Docsity!

CSC 116 โ€” 002 In-class Exercise # 8 Name: Solution Unity ID: Lab: Write 5 test cases to test the following system. Use the table given below to record your test cases. Two test cases will test the equivalence classes and three will test the boundary. You have been asked to write the software in an automatic ticketing machine that photographs the license plates of speeding vehicles. The speed limit of the road the machine is located on is 35 mph, but the machine allows for a car to go at most 10 mph over the speed limit. So if a car is going 45 mph or less, the driver does not receive a ticket. If the car | going faster than 45 mph, the driver does receive a ticket. Test Case ID Description Expected Results Actual Results slowCar Speed = 20 Ticket? No fastCar Speed = 60 Ticket? Yes notQuiteSpeeding | Speed = 44 Ticket? No speedLimit Speed = 45 Ticket? No justSpeeding Speed = 46 Ticket? Yes