@AdamChen3/

Jenny's Coding Lab 1

Java

No description

fork
loading
Files
  • Main.java
Main.java
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
class Main {
  public static void main(String[] args) {
    // You can ignore the following 5 lines.  (Do not edit them)
    System.out.println(run60PointVersion());
    System.out.println(run70PointVersion());
    System.out.println(run80PointVersion());
    System.out.println(run90PointVersion());
    System.out.println(run100PointVersion());
  }

  public static String run60PointVersion(){
    // Write your code for the 60 point version below.  Be sure to stay above the next comment.
    double ticketFaceValue = 70;
    double convenienceFee = 5;
    double ticketTotalPrice = ticketFaceValue + convenienceFee;
    
    
    // Do not edit the following 5 lines, except to uncomment the "result +=" lines when you are ready to test. (Ctrl + /)
    String result = "";
    result += "Ticket Face Value:\t$" + ticketFaceValue + "\n";
    result += "Convenience Fee:\t$" + convenienceFee + "\n";
    result += "Total Price:\t\t$" + ticketTotalPrice + "\n";
    return result;
  }
  
  public static String run70PointVersion(){
    // Write your code for the 70 point version below.  Be sure to stay above the next comment.
    double cashP1 = 25;
    
    
    // Do not edit the following 5 lines, except to uncomment the "result +=" lines when you are ready to test. (Ctrl + /)
    String result = "";
    // result += "Ticket Price:\t\t$" + ticketPrice + "\n";
    // result += "Total:\t\t\t$" + totalCash + "\n";
    // result += "Average:\t\t$" + average + "\n";
    return result;
  }
  
  public static String run80PointVersion(){
    // Write your code for the 80 point version below.  Be sure to stay above the next comment.
    
    

    // Do not edit the following 5 lines, except to uncomment the "result +=" lines when you are ready to test. (Ctrl + /)
    String result = "";
    // result += "Price of 1 shirt:\t$" + shirtPrice + "\n";
    // result += "Number of Shirts:\t" + numShirts + "\n";
    // result += "Total cost:\t\t$" + totalCostOfShirts + "\n";
    return result;
  }
  
  public static String run90PointVersion(){
    // Write your code for the 90 point version below.  Be sure to stay above the next comment.
    
    
    
    // Do not edit the following 6 lines, except to uncomment the "result +=" lines when you are ready to test. (Ctrl + /)
    String result = "";
    // result += "Bars Per Pack:\t\t" + numBarsPerPack + "\n";
    // result += "Packs Bought:\t\t" + numPacksBought + "\n";
    // result += "Num People:\t\t" + numPeople + "\n";
    // result += "Bars Per Person:\t" + numBarsPerPerson + "\n";
    return result;
  }
  
  public static String run100PointVersion(){
    // Write your code for the 100 point version below.  Be sure to stay above the next comment.
    
    
    
    // Do not edit the following 6 lines, except to uncomment the "result +=" lines when you are ready to test. (Ctrl + /)
    String result = "";
    // result += "Bars Per Pack:\t\t" + numBarsPerPack + "\n";
    // result += "Packs Bought:\t\t" + numPacksBought + "\n";
    // result += "Num People:\t\t" + numPeople + "\n";
    // result += "Bars Left Over:\t\t" + numBarsLeftOver + "\n";
    return result;
  }
}