ssd3 练习六的满分答案!
2022-05-29 22:25:22 3KB exercise6 ssd3 答案
1
SSD3 Exercise6 答案,直接可以提交
2022-05-29 21:16:33 89KB SSD3 Exercise6 答案,直接可以提交
1
SSD3 exercise6 答案 保证正确 SSD3 exercise6 答案 保证正确 SSD3 exercise6 答案 保证正确 SSD3 exercise6 答案 保证正确 SSD3 exercise6 答案 保证正确 SSD3 exercise6 答案 保证正确
2022-05-23 15:14:59 3KB SSD3 exercise6 答案 保证正确
1
自己做的 编译通过 可运行 用的时候吧文件名改一下就好的啦
2022-05-23 08:52:21 84KB ssd3
1
卡内基--面向对象--ssd3-exercise5
2022-05-22 23:37:10 4KB ssd3-exercise5
1
卡耐基的SSD系列课程中的SSD3,包括EXAM的答案,也有其他练习的答案
2022-05-17 22:35:43 5.55MB Java SSD3
1
SSD3 Practical Quiz8 2009 StudentArrayList.java
2022-05-15 23:29:30 5KB SSD3 Practical Quiz8 StudentArrayList.java
1
卡耐基梅陇的SSD课程答案 import java.io.*; import java.util.*; /* DOCUMENT THIS CLASS */ public class ShoppingCartApplication { private static BufferedReader stdIn = new BufferedReader( new InputStreamReader(System.in)); private static PrintWriter stdOut = new PrintWriter(System.out, true); private static PrintWriter stdErr = new PrintWriter(System.err, true); private ShoppingCart cart; /* DOCUMENT THIS PUBLIC METHOD */ public static void main(String[] args) throws IOException { ShoppingCartApplication application = new ShoppingCartApplication(); application.run(); } private void run() throws IOException { cart = new ShoppingCart(); int choice = getChoice(); while (choice != 0) { if (choice == 1) { cart.addProduct(readProduct()); } else if (choice == 2) { stdOut.println(cart.toString()); } else if (choice == 3) { stdOut.println(cart.getTotalValue()); } choice = getChoice(); } } private int getChoice() throws IOException { do { int input; try { stdErr.println(); stdErr.print("[0] Quit\n" + "[1] Add Product\n" + "[2] Display Products\n" + "[3] Display Total\n" + "choice>"); stdErr.flush(); input = Integer.parseInt(stdIn.readLine()); if (0 <= input && 3 >= input) { return input; } else { stdErr.println("Invalid choice: " + input); } } catch (NumberFormatException nfe) { stdErr.println(nfe); } } while (true); } private Product readProduct() throws IOException { final String DELIM = "_"; String name = ""; int quantity = 0; double price = 0.0; /* PLACE YOUR CODE HERE */ for (;;) { try { stdErr.print("product [name_qty_price]> "); stdErr.flush(); String s = stdIn.readLine(); StringTokenizer st = new StringTokenizer(s, DELIM); if (st.countTokens() != 3) { stdErr.println("Invalid input"); } else { name = st.nextToken(); quantity = Integer.parseInt(st.nextToken()); price = Double.parseDouble(st.nextToken()); if ((quantity >= 0) && (price >= 0.0D)) { return new Product(name, quantity, price); } stdErr.println("Invalid input"); } } catch (NumberFormatException iae) { stdErr.println(iae); } } } }
2022-04-24 21:43:28 1.9MB ssd3答案 exe1 exe2 exe3
1
ssd3 practical quiz7答案,已经通过并提交
2022-04-17 21:57:06 8KB ssd3 quiz7
1
ssd3 exercise3 ssd3 exercise3 ssd3 exercise3
2022-04-10 22:37:56 6KB ssd3;exercise3
1