8. (4 marks) Create a java program for accepting the dealer details. The application should accept...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
8. (4 marks) Create a java program for accepting the dealer details. The application should accept the dealer details such as name, address, phone number and services offered by the dealer. The dealer detail should be recorded in a file called dealerdetails.txt. This program should use a Serializable interface. The dealer detail will be hardcoded within the program and will not require user input via keyboard(scanner). The dealer details are shown within the program as shown in the program upon running it. Program output: Name: John Curtis Address: 84 Rose Street Springwood NSW 2777 Phone number: 0401566788 Services: Delivery REQUIREMENTS Application class: Implements Serializable It has 4 data fields - String name; String address; String phoneno; String services; . It has one constructor that takes 4 arguments, i.e., application (String name, String address, String phoneno, String services). It has print_details () that prints Name, Address, Phone number and Services on al separate line. Dealerdetail Inputs the hardcoded dealer details using a constructor application ("John Curtis", "84 Rose Street Springwood NSW 2777 ", "0401566788", "delivery") Write and save the dealer details into text file called dealerdetails.txt. Use FileInputStream, FileOutputStream, ObjectOutputStream and ObjectInputStream. Your code must work exactly the same as the specification with the program output as shown and should create a file called dealerdetails.txt in the program directory upon running it. Example of the program output: Name: John Curtis Address: 84 Rose Street Springwood NSW 2777 Phone number: 0401566788 Services: Delivery 8. (4 marks) Create a java program for accepting the dealer details. The application should accept the dealer details such as name, address, phone number and services offered by the dealer. The dealer detail should be recorded in a file called dealerdetails.txt. This program should use a Serializable interface. The dealer detail will be hardcoded within the program and will not require user input via keyboard(scanner). The dealer details are shown within the program as shown in the program upon running it. Program output: Name: John Curtis Address: 84 Rose Street Springwood NSW 2777 Phone number: 0401566788 Services: Delivery REQUIREMENTS Application class: Implements Serializable It has 4 data fields - String name; String address; String phoneno; String services; . It has one constructor that takes 4 arguments, i.e., application (String name, String address, String phoneno, String services). It has print_details () that prints Name, Address, Phone number and Services on al separate line. Dealerdetail Inputs the hardcoded dealer details using a constructor application ("John Curtis", "84 Rose Street Springwood NSW 2777 ", "0401566788", "delivery") Write and save the dealer details into text file called dealerdetails.txt. Use FileInputStream, FileOutputStream, ObjectOutputStream and ObjectInputStream. Your code must work exactly the same as the specification with the program output as shown and should create a file called dealerdetails.txt in the program directory upon running it. Example of the program output: Name: John Curtis Address: 84 Rose Street Springwood NSW 2777 Phone number: 0401566788 Services: Delivery
Expert Answer:
Answer rating: 100% (QA)
Applicationjava 1 2 3 4 5 7 9 10 11 12 13 14 15 249689872289 16 ... View the full answer
Related Book For
Intermediate Accounting principles and analysis
ISBN: 978-0471737933
2nd Edition
Authors: Terry d. Warfield, jerry j. weygandt, Donald e. kieso
Posted Date:
Students also viewed these finance questions
-
A $10,000 loan at 8% compounded semiannually is to be repaid by three equal payments due 2 , 4, and 7 years after the date of the loan. What is the size of each payment?
-
A $9000 loan is to be repaid in three equal payments occurring 60, 180, and 300 days, respectively, after the date of the loan. Calculate the size of these payments if the interest rate on the loan...
-
A loan of $3000 borrowed today is to be repaid in three equal installments due in one year, three years, and five years, respectively. What is the size of the equal installments if money is worth...
-
In Exercises 7980, find the value of y if the line through the two given points is to have the indicated slope. (3, y) and (1, 4), m = -3
-
As part of your financial planning, you wish to purchase a new car exactly 5 years from today. The car you wish to purchase costs $14,000 today, and your research indicates that its price will...
-
Let (a) Graph the function. (b) Determine (2) and lim x2 (x). Is (2) continuous at x = 2? (c) Determine (3) and lim x3 (x). Is (x) continuous at x = 3? (d) Determine (4) and lim x4 (x). Is (x)...
-
Explain the accounting for contributions (of cash, pledges, or investments that may be converted into cash) for a private university. How does this accounting for contributions differ from that of a...
-
Describe the role of International Standards on Auditing. What is the relationship between International Standards on Auditing and U.S. Generally Accepted Auditing Standards?
-
Logistics Solutions provides order fulfillment services for dot.com merchants. The company maintains warehouses that stock items carried by its dot.com clients. When a client receives an order from a...
-
Evaluate the following pure-yield pickup swap: You currently hold a 20-year, AA-rated, 9.0 percent coupon bond priced to yield 11.0 percent. As a swap candidate, you are considering a 20-year,...
-
Part 1 of 2 A student needed to find the measure of angle b She incorrectly said mZb 129 Find the correct measure of angle b What mistake did she likely make m b 0 b V a 51 The figure is not shown to...
-
Carla Vista Corp. sponsors a defined benefit pension plan for its employees. On January 1, 2025, the following balances relate to this plan Plan assets $489,900 Projected benefit obligation 616,700...
-
Question 2 of 8 Shirts were purchased for $12.50 each and were marked up by $18.75. During Christmas, they were discounted by $6.85 per shirt. a. What was the rate of markdown? % Round to two decimal...
-
The cost versus quality decision is one that only few companies get right. What is the cost of quality? It is very high for some companies such as Ford and Bridgestone/Firestone, whose reputations...
-
Find the absolute maximum and absolute minimum values of the function f(x) (x-2)(x-5)+7 = on each of the indicated intervals. Enter 'NONE' for any absolute extrema that does not exist. (A) Interval =...
-
4. Roll one 10-sided die 12 times. The probability of getting exactly 4 eights in those 12 rolls is given by (a) 10 9 4 10 10 (b) HA 9 -HAA (c) 1 (d) 9 (c) 10 9 () 10
-
1. DeLaval just paid a dividend of $0.50 and the company has a stock price of $15. The dividend is expected to grow at 30% over the next 2 years, 15% for one year, and then grow at a constant rate...
-
1) Predict the organicproduct formed when BzCl reacts with cyclohexanol. BzCl = benzoylchloride. 2) Provide the majororganic product of the reaction below. 3) Draw the structureof the product formed...
-
The following transactions occurred during 2009. Assume that depreciation of 10% per year is charged on all machinery and 5% per year on buildings, on a straight-line basis, with no estimated salvage...
-
A review of the ledger of Oklahoma Company at December 31, 2008, produces the following data pertaining to the preparation of annual adjusting entries. 1. Salaries Payable $0. There are eight...
-
Presented below is net asset information related to the Carlos Division of Santana, Inc. The purpose of the Carlos division is to develop a nuclear-powered aircraft. If successful, traveling delays...
-
Describe the criterion for rejecting the null hypothesis when using the p-value method for hypothesis testing. Who chooses the value of the level of significance, ????? Make up a situation (one...
-
Explain in your own words the implications of the regression assumptions for the behavior of the response variable y.
-
Explain what statistics from Table 8.11 indicate to us that there may indeed be a linear relationship between x and y in this example, even though the value for r2 is less than 1%.
![Mobile App Logo](https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png)
Study smarter with the SolutionInn App