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
-
Consider the performance management process from a team point of view. Using the table here, describe whether each of the components in the process is implemented at Duke University. In some cases, a...
-
The cables exert the forces shown on the pole. Assuming the pole is supported by a ball-and-socket joint at its base determine the components of reaction at A. The forces F1 and F2 lie in a...
-
The following information relates to the operations of Emile Luxury Ltd. The profit was $2 750 000. The company distributed preference dividends of $50 000, and ordinary dividends of $300 000. Over...
-
A man wishes to set aside some money for his daughter's college education. His goal is to have a bank savings account containing an amount equivalent to $20,000 with today's purchasing power of the...
-
Why is the course developmental psychology an important pre-requisite for psychopathology course. Why is knowing developmental psychology important in diagnosis?
-
The following is Wolastoq Tours Limited's unadjusted trial balance at its year end, November 30, 2018. The company adjusts its accounts annually. Additional information: 1. The insurance policy has a...
-
Pat and Chris are both short 200 six month call options with a strike price of 75 on Noble Energy. Pat's position has been delta hedged while Chris' has been delta-gamma hedged. (Chris has access to...
-
Ask her should like to lose 2716/30 pounds in three months after diet he lost 9 1/2 pounds on the first month and the second month he lost 7.28 pounds. How much weight does he have to loss and the...
-
Many of us acknowledge the importance of communication in relationships, but do we truly practice good communication? Are we comfortable discussing our feelings or admitting when we're wrong? Discuss...
-
Attempted: 0/1 3. (a) Pansonec Enterprise (PSE) is an electrical equipment manufacturing enterprise with its main office in Semenyih town. It has been in operation for the last 3 years. Karen, owner...
-
Treatment and Therapy Discussion 1. Compare and contrast the following psychotherapy models: Psychoanalysis, behavioral therapy, cognitive behavioral therapy and humanistic therapy. 2. Compare and...
-
Zinc Limited (ZL) has entered into the following transactions: (i) On 1 January 2022, ZL purchased 1.5 million bonds of Copper Limited having face value of Rs. 100 each at a premium of Rs. 5 each...
-
I. Triangle Congruence: SSS, SAS, ASA, AAS, & HL Oh my B Directions: Compare the triangles and determine whether they can be proven congruent, if possible, by SSS, SAS, ASA, AAS, or HL. Write your...
-
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...
-
An engineering student wanted to know which factors influence the time (in seconds) for his car to go from 0 to 30 to 0 miles per hour. Factor \(A\) was the launch, which was either no wheel spin or...
-
The effect on engine wear of oil viscosity, temperature, and a special additive was tested using a \(2^{3}\) factorial design. Given the following results from the experiment, Interpret the effects...
-
Two machines \(X\) and \(Y\) were used to produce two types of plastic polymers, PPET and PAMI. The polymers were produced using materials BA and PP. The production was run 3 times. The \(y\) values...
Study smarter with the SolutionInn App