×

Loading...
Ad by
  • 予人玫瑰,手有余香:加拿大新天地工作移民诚聘求职顾问&行业导师!
Ad by
  • 予人玫瑰,手有余香:加拿大新天地工作移民诚聘求职顾问&行业导师!

decomplied result item.jad, the method getWholesalePrice() seems not in item.class

本文发表在 rolia.net 枫下论坛// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: Item.java


public class Item
implements Comparable
{

public Item(String s, int i, double d)
{
name = s.toLowerCase();
quantity = i;
cost = d;
}

public String getName()
{
return name;
}

public int getQuantity()
{
return quantity;
}

public double getPrice()
{
return cost;
}

public void changeQuantity(int i)
{
quantity += i;
}

public String toString()
{
return name;
}

public int compareTo(Object obj)
{
if(obj == null)
{
return 0x7fffffff;
} else
{
Item item = (Item)obj;
return name.compareTo(item.name);
}
}

protected String name;
protected int quantity;
protected double cost;
}更多精彩文章及讨论,请光临枫下论坛 rolia.net
Report

Replies, comments and Discussions:

  • 工作学习 / 专业技术讨论 / 人家要帮忙, 可是我不会. 这个题难不难呢? 谁有空能不能帮个忙啊? 扣谢.
    • JAVA作业.
      • 啊? 明天一早要交? 快伸出您的手, 帮我们的同胞一下吧.
        • 想帮。不会。
          • 谢谢, 至少你帮我顶了. N年前俺的确编过JAVA程序, 现在死活都拣不起来了.
    • 为啥老说俺这个getWholesalePrice错呢? 老师说在Item class里定义了呀!
      A1.java:90: cannot resolve symbol
      symbol : method getWholesalePrice ()
      location: class Item
      itemPrice = (inventory.get(itemName).getWholesalePrice() * (
      1+MARKUP));
      ^
      A1.java:154: cannot resolve symbol
      symbol : class Scanner
      location: class A1
      Scanner input = new Scanner(System.in);
      ^
      A1.java:154: cannot resolve symbol
      symbol : class Scanner
      location: class A1
      Scanner input = new Scanner(System.in);
      ^
      3 errors
      • 哪位同学有 Java Decompiler, 帮我decompile 那个 tem和 InventoryTable class 吧. 刚google了一个, 结果还得登记.
        • decomplied result item.jad, the method getWholesalePrice() seems not in item.class
          本文发表在 rolia.net 枫下论坛// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
          // Jad home page: http://www.kpdus.com/jad.html
          // Decompiler options: packimports(3)
          // Source File Name: Item.java


          public class Item
          implements Comparable
          {

          public Item(String s, int i, double d)
          {
          name = s.toLowerCase();
          quantity = i;
          cost = d;
          }

          public String getName()
          {
          return name;
          }

          public int getQuantity()
          {
          return quantity;
          }

          public double getPrice()
          {
          return cost;
          }

          public void changeQuantity(int i)
          {
          quantity += i;
          }

          public String toString()
          {
          return name;
          }

          public int compareTo(Object obj)
          {
          if(obj == null)
          {
          return 0x7fffffff;
          } else
          {
          Item item = (Item)obj;
          return name.compareTo(item.name);
          }
          }

          protected String name;
          protected int quantity;
          protected double cost;
          }更多精彩文章及讨论,请光临枫下论坛 rolia.net
          • 太谢谢了! 现在有些头绪了.
        • and one of best java decomplier is jad, which is free
          • 哎呀我的妈呀, 要了老命了. 就剩两个问题了. 1. compile 时找不到 Scanner, 2. 怎样 Set up a decimal format to output doubles as Canadian Currency
            Scanner input = new Scanner(System.in);

            // Set up a decimal format to output doubles as Canadian Currency
          • 全部搞定!哈哈,Java,5年没做过了。谢谢大家,也谢谢幕后那位牛人网友的指点。