Java Assignment 2

Only available on StudyMode
  • Download(s) : 81
  • Published : February 20, 2013
Open Document
Text Preview
INSY 4305/5352
HOMEWORK 2
Part 1

1. Develop class LessonGUI that builds the following graphical user interface.

This is a GridLayout of 14,2. There are two panels; one for customer type and one for lesson type. The window is 550 by 400. When it shows up on the screen, it should show up in the middle.

2. Develop a program, CreateFiles, that creates and writes three files: customers.txt, videos.txt, and tests.txt. You will have three methods: createCustomers, createVideos, and createTests. Use the following data. Customers

Jones Cooper Arlington Texas 76019 12345 gold
Smith Bowen Arlington Texas 76006 65489 platinum
Barker Lancaster FortWorth Texas 76090 54367 silver
Callan Lowe Dallas Texas 75009 98712 gold
Willis King Tulas Oklahoma 56909 25968 platinum

Videos

Jones 1 Introduction 10
Jones 2 Programming 20
Smith 2 Programming 20
Willis 3 Classes 30
Smith 4 Loops 40
Barker 4 Loops 40
Callan 5 Switch 50
Willis 6 Methods 60
Jones 7 Arrays 70
Callan 8 Composition 80
Callan 9 Inheritance 90
Barker 10 Polymorphism 100

Tests

Jones 1 Introduction 85
Jones 2 Programming 96
Smith 2 Programming 75
Willis 3 Classes 70
Smith 4 Loops 82
Barker 4 Loops 83
Callan 5 Switch 100
Willis 6 Methods 77
Jones 7 Arrays 82
Callan 8 Composition 60
Callan 9 Inheritance 92
Barker 10 Polymorphism 80

3. Create three read file methods: readCustomers, readVideos, and readTests. These will be in LessonGUI. When the program is run it will first read the customers, videos, and tests files to populate the lessonList and customerList. Then, it will display the GUI above, and then calculate the charges and print them to a dialog box as in homework 1.
tracking img