A - I'm Sorry Dave. I Can't Do That HAL 9000 is a fictional character in...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A - I'm Sorry Dave. I Can't Do That HAL 9000 is a fictional character in Arthur C. Clarke's 2001: A Space Odyssey. HAL (Heuristically programmed Algorithmic computer) is an AI (artificial intelligence) computer that controls the systems of the spacecraft and interacts with the crew. In this assignment you will finish the Ha19000 class. The Ha19000 has one constructor which takes a string parameter of a name of the crew member it is interacting with. It has methods: public String getName() which gets the name public void setName (String newName) which sets a new name public String greet () which returns a string consisting of "Greetings, name" where name is the name supplied in the constructor. public String reportStatus () which returns a string consisting of "All systems are operating normally, name" where name is the name supplied in the constructor. public String execute (String command) which returns a string consisting of "I am sorry, name. I can't " + command where name is the name supplied in the constructor and command is the parameter. Supply Javadoc for the constructor and all the methods Complete the following file: Hal9000.java * Hal9000 simulate an AI that interacts with the crew * of a space ship. 1 /** 2 3 4 * 5 */ 6 7 { 8 9 public class Ha19000 private String name; Submit Use the following file: Hal9000Tester.java /** */ Tests the HAL9000 Class @author @version public class Ha19000Tester { public static void main(String[] args) { Ha19000 hal = new Hal9000 ("Dave"); System.out.println(hal.greet()); System.out.println("Expected: Welcome, Dave"); System.out.println(hal.getName()); System.out.println("Expected: Dave"); System.out.println(hal.execute(" "engage drive")); System.out.println("Expected: I am sorry, Dave. I can't engage drive"); hal.setName("Aruna"); System.out.println(hal.greet()); System.out.println("Expected: Welcome, Aruna"); System.out.println(hal.execute("power down")); System.out.println("Expected: I am sorry, Aruna. I can't power down"); } } A - I'm Sorry Dave. I Can't Do That HAL 9000 is a fictional character in Arthur C. Clarke's 2001: A Space Odyssey. HAL (Heuristically programmed Algorithmic computer) is an AI (artificial intelligence) computer that controls the systems of the spacecraft and interacts with the crew. In this assignment you will finish the Ha19000 class. The Ha19000 has one constructor which takes a string parameter of a name of the crew member it is interacting with. It has methods: public String getName() which gets the name public void setName (String newName) which sets a new name public String greet () which returns a string consisting of "Greetings, name" where name is the name supplied in the constructor. public String reportStatus () which returns a string consisting of "All systems are operating normally, name" where name is the name supplied in the constructor. public String execute (String command) which returns a string consisting of "I am sorry, name. I can't " + command where name is the name supplied in the constructor and command is the parameter. Supply Javadoc for the constructor and all the methods Complete the following file: Hal9000.java * Hal9000 simulate an AI that interacts with the crew * of a space ship. 1 /** 2 3 4 * 5 */ 6 7 { 8 9 public class Ha19000 private String name; Submit Use the following file: Hal9000Tester.java /** */ Tests the HAL9000 Class @author @version public class Ha19000Tester { public static void main(String[] args) { Ha19000 hal = new Hal9000 ("Dave"); System.out.println(hal.greet()); System.out.println("Expected: Welcome, Dave"); System.out.println(hal.getName()); System.out.println("Expected: Dave"); System.out.println(hal.execute(" "engage drive")); System.out.println("Expected: I am sorry, Dave. I can't engage drive"); hal.setName("Aruna"); System.out.println(hal.greet()); System.out.println("Expected: Welcome, Aruna"); System.out.println(hal.execute("power down")); System.out.println("Expected: I am sorry, Aruna. I can't power down"); } }
Expert Answer:
Posted Date:
Students also viewed these programming questions
-
Assume that a company is going to invest 900,000 USD in a new project. We expect that the invested capital in the fixed assets will be fully depreciated within 3 years as follows: 500,000 USD,...
-
Identify factors that can cause a process to become out of control. Give several examples of such factors.
-
Cacuango Companys adjusted trial balance on August 31, 2008, its fiscal year-end, follows. On August 31, 2008, merchandise inventory was \($41,000.\) Required 1. Compute the companys net sales for...
-
An auditor can accept an assurance engagement only where the practitioners preliminary knowledge of the engagement circumstances indicates that: (a) Relevant ethical requirements, such as...
-
A summary of the controls for the revenue and cash receipts cycle of Keystone Computers & Networks, Inc., appears on pages 479492. a. For the following three controls over sales, indicate one type of...
-
Within the relevant range, if a company's level of production decreases, variable costs a. decrease in total, but remain the same per unit. b. decrease in total, but the per unit amount may increas...
-
riverbed limited is a farm that raises sheep for their wool. during the year the following occurred a lamb was born (fair value less costs to sell 470) it will only be held to produce wool
-
The following information is provided for the first month of operations for Legal Services Inc.: Prepare a T-accounts to reflect the following business transaction: Legal Services, Inc. received the...
-
STU Company expects $2,000,000 of FCF next year. Growth is expected to be 3% per year, and the WACC is 7%. If the company has no debt or preferred stock and 2 million shares of common stock...
-
Sakelaris Corporation makes a product with the following standard costs: Direct materials Standard Quantity or Hours 8.6 kilos 0.4 hours Standard Price or Rate $ 6.00 per kilo $ 11.00 per hour $5.00...
-
Tiger Corp issued bonds at 9 8 with a $ 1 0 , 0 0 0 , 0 0 0 par value in 2 0 1 7 . In 2 0 2 2 , Tiger calls the entire issue at 1 0 1 and redeems it . Immediately prior to the redemption of these...
-
The following information is provided for the first month of operations for Legal Services Inc.: Prepare a T-accounts to reflect the following business transaction: The Company purchased $250 worth...
-
The storekeeper of Chaya Fumiture Manufacturer conducted a stock count of the inventory in the store and determined the value of physical inventory as RM355,125 as at 31 December 2018. The following...
-
The Home Depot is the leading retailer in the home improvement industry and one of the 10largest retailers in the United States. The company included the following on its January 29, 2012, balance...
-
Correctly apply the rules for the order of operations to accurately compute the following: \(3 \times 4^{3} \times 7+24 / 6 \times 7^{2}-9 / 3 \times 8\).
-
Determine if \(\frac{8}{14}\) and \(\frac{12}{26}\) are equivalent fractions.
-
Correctly apply the rules for the order of operations to accurately compute the following: \((8-6)^{2} \times 100-\left((48 / 6-3)^{2}-4 \times 7 ight)\).
Study smarter with the SolutionInn App