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
-
Cynthia needs your advice regarding which form of business entity to choose for her new business. She expects the new business will have losses of approximately $80,000 in each of the first two years...
-
A heat engine operates between two reservoirs at T2 = 600 K and T1 = 350 K. It takes in 1 000 J of energy from the higher-temperature reservoir and performs 250 J of work. Find (a) The entropy change...
-
Problem 8 is the same as problem 7 with respect to initial measurement of the ARO liability. Now assume that Tadpoles credit standing improves over time, causing the credit-adjusted risk-free rate to...
-
Here are comparative statement data for Prince Company and King Company, two competitors. All balance sheet data are as of December 31, 2014, and December 31, 2013. Instructions (a) Prepare a...
-
a) In the conventional theory of the firm, the principal objective of a business is profit maximisation. Under the differences in consumer tastes and technology drive, price and output of a given...
-
Billingham Packaging is considering expanding its production capacity by purchasing a new machine, the XC-750. The cost of the XC-750 is $2.75 million. Unfortunately, installing this machine will...
-
Leyla borrows $1400 from Sam for 7 year(s) at 11.5% compounded quarterly. Then, 1 year(s) before maturity, Sam sells the note to Bill who discounts it based on 13% compounded monthly. How much did...
-
What are policy controls plans? How do policies differ from laws?
-
Describe the key control plans associated with OE/S processes.
-
Describe the relationship between the control matrix and the systems flowchart.
-
a. Explain how bar code readers work. b. Explain how optical character recognition (OCR) works and how it differs from bar code technology. c. Explain how scanners are used to capture data.
-
What is the purpose of the strategic IT plan?
-
7) The following static budget is provided: Per Unit Total Sales $ 60 $ 900,000 Less variable costs: Manufacturing costs 30 450,000 Selling and administrative costs 10 150,000 Contribution margin $...
-
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...
-
Continuing to focus on evidence associated with the act, concealment, and conversion, use the evidentiary material to continue the examination. In addition, the examiner also starts to think of terms...
-
Consider the following cash flow profile and assume MARR is 10 percent/year. a. Determine the ERR for this project. b. Is this project economically attractive? EOY 0 2 3 4 5 6 NCF -$100 $15 $15 $15...
-
Quilts R Us (QRU) is considering investing in a new patterning attachment with the cash flow profile shown in the table below. QRU's MARR is 13.5 percent/year. a. What is this investment's external...
Study smarter with the SolutionInn App