Question: Question 7 Complete the following tester program by choosing the line that prints the expected outcome. public class BankAccount Tester { public static void main(String[]

Question 7 Complete the following tester program by choosing the line that prints the expected outcome. public class BankAccount Tester { public static void main(String[] args) { BankAccount account = new BankAccount(1000); account.deposit(account.getBalance()); System.out.println(account.getBalance } System.out.println("Expected: 1000"); System.out.println("Expected: 2000"); System.out.println("Expected: 2000") println("Expected: 2000"); Question of 10 Question 8 0.2 points We want to create a class that represents a date. A date has a day, month, and year. For example, the date March 16, 2014 has the day 16, month and year 2014. The basic framework of a date class is below. public class Date C private int day: private int month; private int year: > We want to create a specific date using code like: Date First = new Date (16. 3, 2014) 1/ Creates March 16, 2014 Date second = new Date (1,9, 2013): 1 Creates September 1, 2013 Which of the constructor specifications below will allow this code to behave as desired public void Date (int d, int , int y) public init (int d, Int, int y) public Date Cint d, int n, int y public Date Date (int a, int n, int y)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
