top of page

CS304 Data Structures Homework 2 Solution

Updated: Aug 16, 2023

CS304 Data Structures Homework 2 Solution : -

Problem 1:

The WritingExample.java and WritingExampleApp.java are already provided to

you, modify the WritingExampleApp.java class to do the following:

- Prompt the user to enter first name, last name and age.

- Write the data entered by the user to the csv file.

- Ask the user if they want to add mode data.

- If the user enters Yes, then prompt for the first name, last name and age

again, this process continues as long as the user wants to add more data.

- - If the user enters No, then the program stops taking more data and

terminates.

- Do not modify WritingExample.java

- Samples provided on the next page.


Enter first name: John

Enter last name: Doe

Enter age: 45

Inserted

Add more? Type Yes or No: Yes

Enter first name: Johnson

Enter last name: Smith

Enter age: 22

Inserted

Add more? Type Yes or No: Yes

Enter first name: Mike

Enter last name: White

Enter age: 39

Inserted

Add more? Type Yes or No: No

Bye

General Instructions:

- No hard copies will be collected.

- Do not send your files through the email!

- You should submit your work by the due date, No extensions will be given.

(See syllabus for late homework policy).

- DO NOT turn in multiple files, only one .zip file.

What to turn in:

There should be one .java files(WritingExampleApp.java), put the file into a zip

file and name it <YourFirstName_YourLastName>.zip, submit the zip file into the

Dropbox on D2L.

How to zip multiple files?

On Windows: Select all the files > right click > Send to > Comprised File

On Mac: Select all the files > Click/Tap with two fingers > Compress


Download This Solution From Here :

8 views0 comments

Comments


bottom of page