Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Java - Debugging

dickersonka
dickersonka 


Complete Debugging Exercises from Page 543 (a, b, c, d, & e). Please zip all your files. Include screen capture of “ran programs” along with the .java files. (Hint: For file management purposes, you can include the screen captures in one document and submit the other .java source files. This might reduce the number of files to be uploaded.) Attachments Tags Clarifications

Answers

Java - Debugging - Solution

dickersonka
dickersonka 



Attached is the solution to the Java - Debugging assignment including source and comments Attachments
DebugTen.zip (4 K) Download
Preview
class DebugBook { protected int pages; public

Preview
protected double creditLimit; public DebugCustomer(int id, String name, double credit) { this.idNumber = id; this.name

Preview
if(amountOfPurchase > creditLimit) overLimit = true; else overLimit = false; } public void display() {

Preview
{ super(30);

Preview
String composer; DebugMusical(String title, String author, String comp) { super(title, author); this.composer = comp;

Preview
DebugPhoneBook(int pages, String city) { super(pages); area = city; if(pages > CUTOFF) size = "big"; else size =

Preview
display() { System.out.println("The performance is " + title + " by " +

Preview
Salesman", "Arthur Miller"); DebugMusical performance2 = new DebugMusical("Guys and Dolls", "Jo Swerling", "Frank Loesser"); performance1.display();

Preview
public class DebugTen2 { public static void main(String args[]) { DebugVacation myVacation = new DebugVacation();

Preview
{ public static void main(String[] args) { String area, inStr; int pages; area = JOptionPane.showInputDialog(null,

Preview
approved if the // purchase does not exceed the credit limit public class DebugTen4 { public static void

Preview
{ private int days; public DebugVacation() { this(10);

DebugTen1_output.png (3 K) Download Preview

DebugTen2_output.png (1 K) Download Preview

DebugTen3_output.png (8 K) Download Preview

DebugTen4_output.png (1 K) Download Preview

Screenshots
Screenshot
Screenshot
Screenshot
Screenshot
Purchase Answer