I am having trouble with this Java program I am not really s
I am having trouble with this Java program I am not really sure how to start it here is what I have to do
ABC Used Cars
Part 1.
ABC Used Cars needs a report.
They have several different lots that they sell from. The lots are identified by the 5 digit zip code at the beginning of each record.
They would like a report that lists all cars sold from all lots.
They would like the report to list 30 cars per page, on the report. Each page is to have headings and a page number.
Part 2.
ABC Used Cars needs another report.
They would like a report listing all the used cars sold from all the lots. They would like the list sorted by make. (Ford, Chev., etc)
Part 3.
ABC Used Cars needs another report.
They would like a report listing all the used cars sold from all the lots. They would like the list sorted by make. (Ford, Chev., etc)
ABC would like to separate each grouping of each make with a line that indicates how many cars of that make there were, plus 1 blank line.
Part 4.
ABC Used Cars needs another report.
They would like a report that lists all used cars sold from all the lots. They would like the list sorted by Make within Satisfaction rating.
They would like to have the report accumulate a total value of the cars sold within each satisfaction rating and a grand total for cars sold in all satisfaction ratings.
Part 5
ABC Used Cars would like to have an applet created to allow them to view vehicle information over the web.
Customer Name
Make
Year
Price
Part 6
ABC Used Cars would like to have an applet created that creates a pie chart type graph of all the cars sold for each satisfaction rating.
here is some of the data that I need to use
Record Layout for CUSTSALE.DAT
Field Description
Size
Type
Decimal
Zip Code
5
Numeric
0
Zip Code Extension
4
Numeric
0
Customer Number
4
Numeric
0
Customer Name
20
Character
Purchase Date
8
Numeric
0
Make
20
Character
Purchase Price
7
Numeric
2
Year of Vehicle
4
Numeric
0
Filler
3
Character
Satisfaction rating
1
Character
76
and finally this is the other data that i have to use and the data can\'t be modified in any way so the white space that is there has to stay there and can\'t be removed.
4641012341001ALBERT, CARL T. 08252001FORD 02550001991 2 4630712011003ANDREWS, ROBERT 08262001CHEVROLET 07000001958 0 4642323111008ANZIO, RAFELINO 09012001CHEVROLET 04560501978 0 4642401211010ASHLEY, WILLIAM B. 09022001PIERCE-ARROW 12400001932 2 4637531101015ATKINSON, MARK 08272001STUDEBAKER 00500001958 1 4640512911025AVERY, ALFRED A. 08292001HUDSON 02300001954 1 4630112341031BEZZMEK, JENNIFER 08272001FORD 04550001995 2 4630312011033BLAKE, DONALD 08292001FORD 07220501989 1 4641323111041BLONDELL, BONNIE 09042001CHEVROLET 03560501988 1 4640401211045BONADIO, JAMES 09032001PIERCE-ARROW 11500001935 2 4630731101055BUCKO, ONIEDA 08282001STUDEBAKER 02450001964 1 4641012911056BYMANN, FREDRICK 08292001FORD 03300001994 1 4634212341061CALBERT, RONALD 09052001FORD 03550001993 2 4630712111063CHELSEA, MARTHA S. 08302001DODGE BROS. 03500001935 0 4641023111067CLAFLIN, WAYNE R. 09012001CHEVROLET 04560501990 2 4641001211070COLE, CHARLES C. 09022001PIERCE-ARROW 10500001929 2 4630531111075COLEMAN, THOMAS 08272001STUDEBAKER 01670501961 1 4641012211076COLWELL, RICHARD L. 08292001HUDSON 04300001940 1 4641412311080COOPER, JOHNATHAN 09052001FORD 12560001996 2 4630712012002COREY, SARAH D. 08272001CHEVROLET 06500501994 0 4642123112004CRACKLIN, GOODMAN 09012001CHEVROLET 14560501996 0 4632301212011CRAWFORD, TIMOTHY 09012001PIERCE-ARROW 10400001931 2 4631531102012CURRIE, RAYMOND 08282001STUDEBAKER 01500251956 1 4642512912024CYBORG, IZORE M. 09052001HUDSON 01300001949 1 4641012342031DALTON, DAVID P. 08252001FORD 02340001990 2 4630712012043DAVIES, RALPH O. 08262001CHEVROLET 03330001989 0 4642323112048DENNICK, DONNA 09012001CHEVROLET 06560251995 0 4642401212050DERBIN, DEANNA 09022001PIERCE-ARROW 16400251937 2 4637531102065DONNEHUE, PHILLIP 09042001STUDEBAKER 00540001966 1 4640512912085DOPPLER, RADAR O. 08302001HUDSON 03110001951 1 4631012342091DUNLOP, RITA 08252001FORD 14500451996 2 4630312013003DYKES, CYNTHIA 08262001FORD 04100501987 1 4641323113011EATON, ESTER B. 09012001CHEVROLET 13560501996 0 4640401213015EFFLEY, BAILY 09022001PIERCE-ARROW 14460451933 2 4630731103025EGGERTON, AMANDA 08292001STUDEBAKER 03350001965 1 4641012913026EPPLEY, DAVID 08282001FORD 04140001995 1 4634212343031ERKLE, ROSA 09032001FORD 03550201993 2 4630712113043FARNSWORTH, WESLEY 09052001DODGE BROS. 11500001996 0 4641023113047FLANNERY, JAMES 09012001CHEVROLET 04500501992 0 4641001213050FOREMAN, OTTO J. 09022001PIERCE-ARROW 09400001927 2 4630531113055FOWLER, KATHLEEN 08272001STUDEBAKER 02670501964 1 4641012213056FURNACE, DAVID 08292001HUDSON 05300001948 1 4641412313061GALLAGHER, CLARENCE 09042001FORD 10060001992 2 4630712013062GENNERRO, TONY S. 08302001CHEVROLET 03200501989 0 4642123113066GOEBEL, NANCY K. 09022001CHEVROLET 06430501990 0 4632301213072GUNTHER, FREDERICK 09032001PIERCE-ARROW 12600001930 2 4631531103080HAINES, MARSHALL 08292001STUDEBAKER 02500251959 1 4642512913094HANCOCK, JONATHON 09032001HUDSON 03300001953 1 4642323113098HARTNETT, ROBERTO 09052001CHEVROLET 03260401988 0 4642401214005HENNING, SONIA 09052001PIERCE-ARROW 13050001928 2 4637531104009HORNSBY, ROGERS 08252001STUDEBAKER 01675001962 1 4640512914012HYATT, JANET F. 08302001HUDSON 01550001951 1 4630112344021IDZIOR, RAYMOND 09012001FORD 14600001996 2 4630312014022JENNINGS, WILLIAM 08262001FORD 06120401992 1 4641023114024JOHNSON, JACK 09032001CHEVROLET 02560501985 0 4640401214032KULKA, ROBERT C. 09042001PIERCE-ARROW 09700001934 2 4630731104035KURTZ, DONALD 08302001STUDEBAKER 03450001966 1 4641012914038LEVANDOWSKI, JILL 08282001DODGE BROS. 04300001988 1 4634212344044METZ, ARNOLD E. 09012001FORD 13230001996 2 4630712114046NORRIS, CHARLES S. 09052001CHEVROLET 08440001992 0 4641023114047NOWAKOWSKI, ALFRED 09012001DODGE BROS. 06560501994 1 4641001214053O\'BOYLE, NIEL 09032001PIERCE-ARROW 15500001938 2 4630531114056O\'BRIAN, PATRICK 08302001STUDEBAKER 03470501962 1 4641012214059PATTERSON, LENNI R. 08292001HUDSON 02500001946 1 4641412314061PERRY, SHAMUS 09052001FORD 08950001994 2 4630712014066REED, ROBERT B. 08272001CHEVROLET 07400501996 0 4642123114067RODRIGUEZ, ALONZO 09052001DODGE BROS. 10500501995 0 4632301214073SANCHEZ, HENRY 09012001PIERCE-ARROW 08300001925 2 4631531104081SWARTZ, HECTOR 08282001STUDEBAKER 00750251954 1 4630112344084TORREZ, MARTIN 08272001FORD 05650001994 2 4630312014090TUTTLE, MARK 08292001FORD 07100501996 1 4641323114094WARNER, JACK 09042001CHEVROLET 08560501996 0 4640401214115YACKLEY, YOURTO 09042001PIERCE-ARROW 10000001930 2
Any help would be very much appreciated.
| Field Description | Size | Type | Decimal | 
| Zip Code | 5 | Numeric | 0 | 
| Zip Code Extension | 4 | Numeric | 0 | 
| Customer Number | 4 | Numeric | 0 | 
| Customer Name | 20 | Character | |
| Purchase Date | 8 | Numeric | 0 | 
| Make | 20 | Character | |
| Purchase Price | 7 | Numeric | 2 | 
| Year of Vehicle | 4 | Numeric | 0 | 
| Filler | 3 | Character | |
| Satisfaction rating | 1 | Character | |
| 76 | 
Solution
Hi I am try to make skelton and classes , methods which are require for implemrnting this.
You have to detail each methods on need basis ..........
-This is model class and data holder classs which can contains data and setter/getter
package elastic5.elastic5;
import java.util.Date;
public class CustomerSale {
//details of records
private String zipCodeExtension;
private String customerNumber;
private String customerName;
private Date purchaseDate;
private double purchasePrice;
private String yearofVehicle;
private String filler;
private int satisfactionRating;
private String make;
public String getMake() {
return make;
}
public void setMake(String make) {
this.make = make;
}
private String zipCode;
public String getZipCode() {
return zipCode;
}
public void setZipCode(String zipCode) {
this.zipCode = zipCode;
}
public String getZipCodeExtension() {
return zipCodeExtension;
}
public void setZipCodeExtension(String zipCodeExtension) {
this.zipCodeExtension = zipCodeExtension;
}
public String getCustomerNumber() {
return customerNumber;
}
public void setCustomerNumber(String customerNumber) {
this.customerNumber = customerNumber;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public Date getPurchaseDate() {
return purchaseDate;
}
public void setPurchaseDate(Date purchaseDate) {
this.purchaseDate = purchaseDate;
}
public double getPurchasePrice() {
return purchasePrice;
}
public void setPurchasePrice(double purchasePrice) {
this.purchasePrice = purchasePrice;
}
public String getYearofVehicle() {
return yearofVehicle;
}
public void setYearofVehicle(String yearofVehicle) {
this.yearofVehicle = yearofVehicle;
}
public String getFiller() {
return filler;
}
public void setFiller(String filler) {
this.filler = filler;
}
public int getSatisfactionRating() {
return satisfactionRating;
}
public void setSatisfactionRating(int satisfactionRating) {
this.satisfactionRating = satisfactionRating;
}
}
//Customer report using ths you can generate multple report and use for diffrent visualisation
//Please read methods comments for more detail understanding
package elastic5.elastic5;
import java.util.HashMap;
import com.sun.javafx.scene.control.skin.VirtualFlow.ArrayLinkedList;
//This class is used for generating diffrent type of reports
public class CustomerReport {
//sort record by make and return map of make and list of customer sale you need to use collecton in details
public HashMap<String, ArrayLinkedList<CustomerSale>> sortByMake(ArrayLinkedList<CustomerSale> customerSaleList){
//make and list of customer
HashMap<String, ArrayLinkedList<CustomerSale>>report=new HashMap<String, ArrayLinkedList<CustomerSale>>();
//write logc for sorting record by make
return report;
}
public HashMap<String, ArrayLinkedList<CustomerSale>> groupbyLots(ArrayLinkedList<CustomerSale> customerSaleList){
//lots and corresponding customer list
HashMap<String, ArrayLinkedList<CustomerSale>>report=new HashMap<String, ArrayLinkedList<CustomerSale>>();
//write logc for sorting record by lots
return report;
}
public HashMap<String, ArrayLinkedList<CustomerSale>> groupbySatisfactionRating(ArrayLinkedList<CustomerSale> customerSaleList){
//SatisfactionRating and corresponding customer list
HashMap<String, ArrayLinkedList<CustomerSale>>report=new HashMap<String, ArrayLinkedList<CustomerSale>>();
//write logc for sorting record by lots
return report;
}
public HashMap<String, ArrayLinkedList<CustomerSale>>totalCarsellingbyRating(ArrayLinkedList<CustomerSale> customerSaleList){
//rating and corresponding customer list
HashMap<String, ArrayLinkedList<CustomerSale>>report=new HashMap<String, ArrayLinkedList<CustomerSale>>();
//write logc for sorting record by lots
return report;
}
public static void main(String[] args) {
//create list of customer
ArrayLinkedList<CustomerSale>customerSaleList=new ArrayLinkedList<CustomerSale>();
///fill customer details
CustomerSale customerSale=new CustomerSale();
customerSale.setCustomerName(\"Parmesh\");
customerSale.setCustomerNumber(\"3454\");
customerSale.setSatisfactionRating(66);
customerSale.setZipCode(\"21045\");
customerSale.setZipCodeExtension(\"3333\");
customerSale.setMake(\"6383239988329398SUV\");
customerSaleList.add(customerSale);
CustomerSale customerSale1=new CustomerSale();
customerSale1.setCustomerName(\"Parmesh dayal\");
customerSale1.setCustomerNumber(\"5432\");
customerSale1.setSatisfactionRating(66);
customerSale1.setZipCode(\"21025\");
customerSale1.setZipCodeExtension(\"3333\");
customerSale1.setMake(\"638323998832964398ford\");
customerSaleList.add(customerSale1);
}
}
//Data visulisaton in tabular for on need basis
package elastic5.elastic5;
import java.util.Date;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.SwingUtilities;
public class DisplayCarSale extends JFrame
{
private String zipCodeExtension;
private String customerNumber;
private String customerName;
private Date purchaseDate;
private double purchasePrice;
private String yearofVehicle;
private String filler;
private int satisfactionRating;
private String make;
public DisplayCarSale()
{
//headers for the table
String[] columns = new String[] {
\"Id\", \"zipCodeExtension\", \"customerNumber\", \"make\"
};
//use getter methods for displaying the data on need basis
Object[][] data = new Object[][] {
{1, \"eeee\", 40.0, false },
{2, \"Rambo\", 70.0, false },
{3, \"Zorro\", 60.0, true },
};
//create table with data
JTable table = new JTable(data, columns);
//add the table to the frame
this.add(new JScrollPane(table));
this.setTitle(\"Table Example\");
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.pack();
this.setVisible(true);
}
public static void main(String[] args)
{
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new DisplayCarSale();
}
});
}
}
Solution and approach for implementning final version :--
Part 1.
ABC Used Cars needs a report.
They have several different lots that they sell from. The lots are identified by the 5 digit zip code at the beginning of each record.
They would like a report that lists all cars sold from all lots.
They would like the report to list 30 cars per page, on the report. Each page is to have headings and a page number.
 -call beloe methods
//make and list of customer
HashMap<String, ArrayLinkedList<CustomerSale>>report=new HashMap<String, ArrayLinkedList<CustomerSale>>();
//write logc for sorting record by make
return report;
}
public HashMap<String, ArrayLinkedList<CustomerSale>> groupbyLots(ArrayLinkedList<CustomerSale> customerSaleList){
return report;}
//lots and corresponding customer list
HashMap<String, ArrayLinkedList<CustomerSale>>report=new HashMap<String, ArrayLinkedList<CustomerSale>>();
//write logc for sorting record by lots
return report;
}
Part 2.
ABC Used Cars needs another report.
They would like a report listing all the used cars sold from all the lots. They would like the list sorted by make. (Ford, Chev., etc)
public HashMap<String, ArrayLinkedList<CustomerSale>>totalCarsellingbyRating(ArrayLinkedList<CustomerSale> customerSaleList){
//rating and corresponding customer list
HashMap<String, ArrayLinkedList<CustomerSale>>report=new HashMap<String, ArrayLinkedList<CustomerSale>>();
//write logc for sorting record by lots
return report;
}
Part 3.
ABC Used Cars needs another report.
They would like a report listing all the used cars sold from all the lots. They would like the list sorted by make. (Ford, Chev., etc)
ABC would like to separate each grouping of each make with a line that indicates how many cars of that make there were, plus 1 blank lin
//sort record by make and return map of make and list of customer sale you need to use collecton in details
public HashMap<String, ArrayLinkedList<CustomerSale>> sortByMake(ArrayLinkedList<CustomerSale> customerSaleList){
//make and list of customer
HashMap<String, ArrayLinkedList<CustomerSale>>report=new HashMap<String, ArrayLinkedList<CustomerSale>>();
//write logc for sorting record by make
return report;
}
display:-
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new DisplayCarSale();
}
});
}
Part 4.
ABC Used Cars needs another report.
They would like a report that lists all used cars sold from all the lots. They would like the list sorted by Make within Satisfaction rating.
They would like to have the report accumulate a total value of the cars sold within each satisfaction rating and a grand total for cars sold in all satisfaction ratings.
//sort record by make and return map of make and list of customer sale you need to use collecton in details
public HashMap<String, ArrayLinkedList<CustomerSale>> sortByMake(ArrayLinkedList<CustomerSale> customerSaleList){
//make and list of customer
HashMap<String, ArrayLinkedList<CustomerSale>>report=new HashMap<String, ArrayLinkedList<CustomerSale>>();
//write logc for sorting record by make
return report;
}
display:-
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new DisplayCarSale();
}
});
}
Part 5
ABC Used Cars would like to have an applet created to allow them to view vehicle information over the web.
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new DisplayCarSale();
}
});
}












