2. Write an application with the following features: Create a class called Customers YourStudentid a. i. Private fields:

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

2. Write an application with the following features: Create a class called Customers YourStudentid a. i. Private fields:

Post by answerhappygod »

2 Write An Application With The Following Features Create A Class Called Customers Yourstudentid A I Private Fields 1
2 Write An Application With The Following Features Create A Class Called Customers Yourstudentid A I Private Fields 1 (67.05 KiB) Viewed 33 times
2. Write an application with the following features: Create a class called Customers YourStudentid a. i. Private fields: first_name, last_name, ip_address, company, email_address Accessor and mutators for the private fields ii. iii. A constructor that accepts 4 parameters: first_name, last_name, ip_address, company iv. Default constructor - to initialize the private fields to empty String b. Create a class called CustomerInfo_YourStudentld Must have public static void main Method: public static Customers YourStudentid [] getCustomers(String filename) 1. reads the contents of the file, stores the data in an array, and return the array Customers YourStudentid [] yourvariable Since you do not know how many rows you have in the file, you need to find an algorithm that would solve that. Do not use ArrayList. You can create additional methods as needed. CPSC 1204 Assignment #1 i. ii. 2. make sure to close the file before the return statement iii. Method: public static void generateEmail(Customers_YourStudentid [] data) 2. 1. Generates an email for every customer and store in the private field email_address Email address: first letter of the first_name, last name, @company, randomly selected top-level domain Examples of TLD: .com, .edu, .ca, .gov You must have at least 5 different TLDs to randomly pick from. iv. Method: public static void display(final Customers_YourStudentid [] data) 1. Displays the headers and contents of the array. Use printf for proper formatting. Make sure that the data does not occupy the space of another column 2. If last_name is displayed on the 2nd column, no parts or characters should appear on the adjacent columns (e.g. #1 and #3) 2|Page Due: July 6, 2022 1:00PM v. Implement 2 methods demonstrating the use of overloading in the context of the application.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply