SlideShare a Scribd company logo
1 of 25
Download to read offline
In this project, we combine the concepts of Recursion and Sorting. Since the Java Collection API
provides various built-in sorting capabilities, so we will focus on Merge Sort and have it applied
to a file.
a) The input file that you are going to use is the tab-delimited text file "p1arts.txt".
b) the output file that you are going to produce using File I/O is also the tabdelimited text file
called "p6sortedArts.txt" which is sorted ascendingly on artistID and then artID both.
Example follows:
(sample output just for artistID) (have to sort both, ArtistID and then ArtID):
ArtistID ArtID Title Appraised Value
1 1038 Spring Flowers 800
1 1050 Cattle Ranch 10000
1 1103 Trail End 8000
2 1042 Coffee on the Trail 7544
3 1013 Superstitions 78000
3 1021 Bead Wall 14000
3 1034 Beaver Pole Jumble 28000
3 1063 Asleep in the Garden 110000
Programming Steps:
1) Create a class called Art that implements Comparable interface.
2) Read part of the file and use Merge Sort to sort the array of Art and then write them to a file.
3) Read some more records from the file, sort them, and merge them with the sorted file on the
disk.
4) Repeat the above step until it is all done.
p1arts.txt:
I am providing the sample programs that you might need:
MergeSort.java:
ArraySorter.java:
Name.java:
Artist.java:
Driver.java:
Solution
//i added 2 classes for sorting
public class Record implements Comparable {
public int artId;
public String title;
public int artistId;
public int AppraisedValue;
/**
* @param artId
* @param title
* @param artistId
* @param appraisedValue
*/
public Record(int artId, String title, int artistId, int appraisedValue) {
this.artId = artId;
this.title = title;
this.artistId = artistId;
this.AppraisedValue = appraisedValue;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + AppraisedValue;
result = prime * result + artId;
result = prime * result + artistId;
result = prime * result + ((title == null) ? 0 : title.hashCode());
return result;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Record other = (Record) obj;
if (AppraisedValue != other.AppraisedValue)
return false;
if (artId != other.artId)
return false;
if (artistId != other.artistId)
return false;
if (title == null) {
if (other.title != null)
return false;
} else if (!title.equals(other.title))
return false;
return true;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return artistId + " " + artId + " " + title + " " + AppraisedValue;
}
@Override
public int compareTo(Record record) {
// to sort ascending order
return this.artistId - record.artistId;
}
}
***********************************************************************
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class Art {
public static void main(String[] args) throws IOException {
List records = new ArrayList();
BufferedReader reader = new BufferedReader(new FileReader(new File(
"D:p6sortedArts.txt")));
String line = "";
while ((line = reader.readLine()) != null) {
System.out.println(line);
String[] words = line.split("s+");
int artId = Integer.parseInt(words[0]);
String title = words[1];
int artistId = Integer.parseInt(words[2]);
int appraisedValue = Integer.parseInt(words[3]);
Record record = new Record(artId, title, artistId, appraisedValue);
System.out.println(record);
records.add(record);
}
System.out
.println("before sorting using collections by using artist id");
for (Record record : records) {
System.out.println(record);
}
System.out
.println("*********************************************************************
");
System.out.println("after sorting based on artist id");
// after sorting
// collections uses internally merge sort
Collections.sort(records);
for (Record record : records) {
System.out.println(record);
}
System.out
.println("*******************************************************************");
// sorting using arrays based on artist id
// it uses quicksort internally
System.out.println("sorting using arrays class sort method");
Record[] array = records.toArray(new Record[records.size()]);
Arrays.sort(array);
for (int j = 0; j < array.length; j++) {
System.out.println(array[j]);
}
reader.close();
}
}
*****************************************************************************
***********************
given text file (p6artists.txt)
1001 RedRockMountain 50 18000
1002 Offerings 52 10000
1003 SpringFlowers 12 2400
1004 SeekingShelter 64 52000
1005 TheHang 18 8000
1006 HouseRemembered 32 700
1007 HomagetotheAncestors 82 1200
1008 EndofthePath 26 1900
1009 Amen 28 3000
1010 Untitled(landwithadobe) 71 800
1011 Eve 19 975
1012 ManonHorseback 74 8000
1013 Superstitions 3 78000
1014 Plenty 45 500
1015 Punch 46 10000
1016 Untitled 65 6000
1017 Brittlecone 6 1300
1018 MountainScene 8 2500
1019 TheWhiteHeart 61 9300
1020 Untitled(Manholdingcoat) 73 3000
1021 BeadWall 3 14000
1022 TheCowboy 69 4200
1023 ShootingtheRapids 47 1300
1024 SpiritandNature 48 592
1025 ProfileofaWoman 68 625
1026 Untitled(couple) 66 4000
1027 MountainClimber 47 4700
1028 Tiredcowboy 50 4700
1029 HorseshoeFalls 31 15000
1030 AshBench 28 13000
1031 Inside/Out 34 3500
1032 RisingSun 42 2000
1033 Untitled(Womanabstract) 77 2500
1034 BeaverPoleJumble 3 28000
1035 Nature/Nurture 47 1300
1036 Blackhawk 5 25500
1037 FloatingWorld 21 2350
1038 SpringFlowers 1 800
1039 Treachery 14 20000
1040 NightonthePraire 47 1300
1041 NightVersion 29 3800
1042 CoffeeontheTrail 2 7544
1043 CreosoteBushes 28 18000
1044 MexicanFiesta 43 14000
1045 LeafPatterns 38 2100
1046 ImmediateGratification 33 1500
1047 MedicineMan 44 2500
1048 ComfyChair 57 800
1049 ButtercupwithRedLip 7 400
1050 CattleRanch 1 10000
1051 NightVersion 36 7000
1052 AmericanRodeo 16 3500
1053 BlueEyedIndian 6 40000
1054 SnakeCharmer 50 4500
1055 StarlitEvening 9 9500
1056 CavalryIsComing 6 1900
1057 Untitled 66 4500
1058 TheGathering 60 250
1059 Dwelling 17 16000
1060 StorySticks 42 650
1061 UntitledMural 78 3520
1062 CowboyandSaddle 41 18000
1063 AsleepintheGarden 3 110000
1064 SpiritColumns 51 7000
1065 Moonlite 47 1300
1066 Untitled(stilllife) 76 19500
1067 OwlinFlight 49 7000
1068 Moonlight 50 9750
1069 Renaissance 50 5500
1070 Beginnings 4 27500
1071 RidetheRapids 79 300
1072 Funnel 24 4500
1073 DancingintheLight 15 4000
1074 StormontheRise 55 8000
1075 WesternBootsandSpurs 6 6000
1076 RidetheBronco 79 1500
1077 BullRiding 6 5200
1078 Chuckwagon 28 32000
1079 CarryingtheMail 62 8000
1080 TheDustBehind 59 18000
1081 ComingUnderFire 13 650
1082 SpringFlowers 29 20000
1083 Untitled 64 2500
1084 CrossingthePlattRiver 23 2200
1085 Traces 63 20000
1086 Untitled(desertlandscape) 67 18000
1087 ThreeWoman 81 20000
1088 Lessons 37 3700
1089 LifeLessons 53 4125
1090 OfftheGrid 11 8000
1091 StonePalette 54 11500
1092 DressingUp 47 1300
1093 Antelopes 62 12500
1094 LifeIsSweet 39 25000
1095 TheSpirit 61 20000
1096 CeremonialSticks 10 15000
1097 Untitled(Sea) 75 2800
1098 SweetProject 56 592
1099 WatchThatRattler 20 900
1100 HungryCowboys 38 750
1101 TheRedDoor 58 10000
1102 CryingHats 14 10000
1103 TrailEnd 1 8000
1104 Untitled 70 1800
1105 MeteorShow 80 10000
1106 HorseCorral 40 12500
1107 StrikingItRich 35 1750
1108 UntitledMural 77 400
1109 Friends 22 16000
1110 ThreeSisters 62 6500
1111 Untitled(manandcrucifix) 72 3200
1112 DarkCanyon 27 8000
1113 ShadowHouse 50 5500
1114 StorytellingattheCampfire 50 18000
1115 StarryNight 25 8500
1116 ApacheWarrior 30 23000
output
1001 RedRockMountain 50 18000
50 1001 RedRockMountain 18000
1002 Offerings 52 10000
52 1002 Offerings 10000
1003 SpringFlowers 12 2400
12 1003 SpringFlowers 2400
1004 SeekingShelter 64 52000
64 1004 SeekingShelter 52000
1005 TheHang 18 8000
18 1005 TheHang 8000
1006 HouseRemembered 32 700
32 1006 HouseRemembered 700
1007 HomagetotheAncestors 82 1200
82 1007 HomagetotheAncestors 1200
1008 EndofthePath 26 1900
26 1008 EndofthePath 1900
1009 Amen 28 3000
28 1009 Amen 3000
1010 Untitled(landwithadobe) 71 800
71 1010 Untitled(landwithadobe) 800
1011 Eve 19 975
19 1011 Eve 975
1012 ManonHorseback 74 8000
74 1012 ManonHorseback 8000
1013 Superstitions 3 78000
3 1013 Superstitions 78000
1014 Plenty 45 500
45 1014 Plenty 500
1015 Punch 46 10000
46 1015 Punch 10000
1016 Untitled 65 6000
65 1016 Untitled 6000
1017 Brittlecone 6 1300
6 1017 Brittlecone 1300
1018 MountainScene 8 2500
8 1018 MountainScene 2500
1019 TheWhiteHeart 61 9300
61 1019 TheWhiteHeart 9300
1020 Untitled(Manholdingcoat) 73 3000
73 1020 Untitled(Manholdingcoat) 3000
1021 BeadWall 3 14000
3 1021 BeadWall 14000
1022 TheCowboy 69 4200
69 1022 TheCowboy 4200
1023 ShootingtheRapids 47 1300
47 1023 ShootingtheRapids 1300
1024 SpiritandNature 48 592
48 1024 SpiritandNature 592
1025 ProfileofaWoman 68 625
68 1025 ProfileofaWoman 625
1026 Untitled(couple) 66 4000
66 1026 Untitled(couple) 4000
1027 MountainClimber 47 4700
47 1027 MountainClimber 4700
1028 Tiredcowboy 50 4700
50 1028 Tiredcowboy 4700
1029 HorseshoeFalls 31 15000
31 1029 HorseshoeFalls 15000
1030 AshBench 28 13000
28 1030 AshBench 13000
1031 Inside/Out 34 3500
34 1031 Inside/Out 3500
1032 RisingSun 42 2000
42 1032 RisingSun 2000
1033 Untitled(Womanabstract) 77 2500
77 1033 Untitled(Womanabstract) 2500
1034 BeaverPoleJumble 3 28000
3 1034 BeaverPoleJumble 28000
1035 Nature/Nurture 47 1300
47 1035 Nature/Nurture 1300
1036 Blackhawk 5 25500
5 1036 Blackhawk 25500
1037 FloatingWorld 21 2350
21 1037 FloatingWorld 2350
1038 SpringFlowers 1 800
1 1038 SpringFlowers 800
1039 Treachery 14 20000
14 1039 Treachery 20000
1040 NightonthePraire 47 1300
47 1040 NightonthePraire 1300
1041 NightVersion 29 3800
29 1041 NightVersion 3800
1042 CoffeeontheTrail 2 7544
2 1042 CoffeeontheTrail 7544
1043 CreosoteBushes 28 18000
28 1043 CreosoteBushes 18000
1044 MexicanFiesta 43 14000
43 1044 MexicanFiesta 14000
1045 LeafPatterns 38 2100
38 1045 LeafPatterns 2100
1046 ImmediateGratification 33 1500
33 1046 ImmediateGratification 1500
1047 MedicineMan 44 2500
44 1047 MedicineMan 2500
1048 ComfyChair 57 800
57 1048 ComfyChair 800
1049 ButtercupwithRedLip 7 400
7 1049 ButtercupwithRedLip 400
1050 CattleRanch 1 10000
1 1050 CattleRanch 10000
1051 NightVersion 36 7000
36 1051 NightVersion 7000
1052 AmericanRodeo 16 3500
16 1052 AmericanRodeo 3500
1053 BlueEyedIndian 6 40000
6 1053 BlueEyedIndian 40000
1054 SnakeCharmer 50 4500
50 1054 SnakeCharmer 4500
1055 StarlitEvening 9 9500
9 1055 StarlitEvening 9500
1056 CavalryIsComing 6 1900
6 1056 CavalryIsComing 1900
1057 Untitled 66 4500
66 1057 Untitled 4500
1058 TheGathering 60 250
60 1058 TheGathering 250
1059 Dwelling 17 16000
17 1059 Dwelling 16000
1060 StorySticks 42 650
42 1060 StorySticks 650
1061 UntitledMural 78 3520
78 1061 UntitledMural 3520
1062 CowboyandSaddle 41 18000
41 1062 CowboyandSaddle 18000
1063 AsleepintheGarden 3 110000
3 1063 AsleepintheGarden 110000
1064 SpiritColumns 51 7000
51 1064 SpiritColumns 7000
1065 Moonlite 47 1300
47 1065 Moonlite 1300
1066 Untitled(stilllife) 76 19500
76 1066 Untitled(stilllife) 19500
1067 OwlinFlight 49 7000
49 1067 OwlinFlight 7000
1068 Moonlight 50 9750
50 1068 Moonlight 9750
1069 Renaissance 50 5500
50 1069 Renaissance 5500
1070 Beginnings 4 27500
4 1070 Beginnings 27500
1071 RidetheRapids 79 300
79 1071 RidetheRapids 300
1072 Funnel 24 4500
24 1072 Funnel 4500
1073 DancingintheLight 15 4000
15 1073 DancingintheLight 4000
1074 StormontheRise 55 8000
55 1074 StormontheRise 8000
1075 WesternBootsandSpurs 6 6000
6 1075 WesternBootsandSpurs 6000
1076 RidetheBronco 79 1500
79 1076 RidetheBronco 1500
1077 BullRiding 6 5200
6 1077 BullRiding 5200
1078 Chuckwagon 28 32000
28 1078 Chuckwagon 32000
1079 CarryingtheMail 62 8000
62 1079 CarryingtheMail 8000
1080 TheDustBehind 59 18000
59 1080 TheDustBehind 18000
1081 ComingUnderFire 13 650
13 1081 ComingUnderFire 650
1082 SpringFlowers 29 20000
29 1082 SpringFlowers 20000
1083 Untitled 64 2500
64 1083 Untitled 2500
1084 CrossingthePlattRiver 23 2200
23 1084 CrossingthePlattRiver 2200
1085 Traces 63 20000
63 1085 Traces 20000
1086 Untitled(desertlandscape) 67 18000
67 1086 Untitled(desertlandscape) 18000
1087 ThreeWoman 81 20000
81 1087 ThreeWoman 20000
1088 Lessons 37 3700
37 1088 Lessons 3700
1089 LifeLessons 53 4125
53 1089 LifeLessons 4125
1090 OfftheGrid 11 8000
11 1090 OfftheGrid 8000
1091 StonePalette 54 11500
54 1091 StonePalette 11500
1092 DressingUp 47 1300
47 1092 DressingUp 1300
1093 Antelopes 62 12500
62 1093 Antelopes 12500
1094 LifeIsSweet 39 25000
39 1094 LifeIsSweet 25000
1095 TheSpirit 61 20000
61 1095 TheSpirit 20000
1096 CeremonialSticks 10 15000
10 1096 CeremonialSticks 15000
1097 Untitled(Sea) 75 2800
75 1097 Untitled(Sea) 2800
1098 SweetProject 56 592
56 1098 SweetProject 592
1099 WatchThatRattler 20 900
20 1099 WatchThatRattler 900
1100 HungryCowboys 38 750
38 1100 HungryCowboys 750
1101 TheRedDoor 58 10000
58 1101 TheRedDoor 10000
1102 CryingHats 14 10000
14 1102 CryingHats 10000
1103 TrailEnd 1 8000
1 1103 TrailEnd 8000
1104 Untitled 70 1800
70 1104 Untitled 1800
1105 MeteorShow 80 10000
80 1105 MeteorShow 10000
1106 HorseCorral 40 12500
40 1106 HorseCorral 12500
1107 StrikingItRich 35 1750
35 1107 StrikingItRich 1750
1108 UntitledMural 77 400
77 1108 UntitledMural 400
1109 Friends 22 16000
22 1109 Friends 16000
1110 ThreeSisters 62 6500
62 1110 ThreeSisters 6500
1111 Untitled(manandcrucifix) 72 3200
72 1111 Untitled(manandcrucifix) 3200
1112 DarkCanyon 27 8000
27 1112 DarkCanyon 8000
1113 ShadowHouse 50 5500
50 1113 ShadowHouse 5500
1114 StorytellingattheCampfire 50 18000
50 1114 StorytellingattheCampfire 18000
1115 StarryNight 25 8500
25 1115 StarryNight 8500
1116 ApacheWarrior 30 23000
30 1116 ApacheWarrior 23000
before sorting using collections by using artist id
50 1001 RedRockMountain 18000
52 1002 Offerings 10000
12 1003 SpringFlowers 2400
64 1004 SeekingShelter 52000
18 1005 TheHang 8000
32 1006 HouseRemembered 700
82 1007 HomagetotheAncestors 1200
26 1008 EndofthePath 1900
28 1009 Amen 3000
71 1010 Untitled(landwithadobe) 800
19 1011 Eve 975
74 1012 ManonHorseback 8000
3 1013 Superstitions 78000
45 1014 Plenty 500
46 1015 Punch 10000
65 1016 Untitled 6000
6 1017 Brittlecone 1300
8 1018 MountainScene 2500
61 1019 TheWhiteHeart 9300
73 1020 Untitled(Manholdingcoat) 3000
3 1021 BeadWall 14000
69 1022 TheCowboy 4200
47 1023 ShootingtheRapids 1300
48 1024 SpiritandNature 592
68 1025 ProfileofaWoman 625
66 1026 Untitled(couple) 4000
47 1027 MountainClimber 4700
50 1028 Tiredcowboy 4700
31 1029 HorseshoeFalls 15000
28 1030 AshBench 13000
34 1031 Inside/Out 3500
42 1032 RisingSun 2000
77 1033 Untitled(Womanabstract) 2500
3 1034 BeaverPoleJumble 28000
47 1035 Nature/Nurture 1300
5 1036 Blackhawk 25500
21 1037 FloatingWorld 2350
1 1038 SpringFlowers 800
14 1039 Treachery 20000
47 1040 NightonthePraire 1300
29 1041 NightVersion 3800
2 1042 CoffeeontheTrail 7544
28 1043 CreosoteBushes 18000
43 1044 MexicanFiesta 14000
38 1045 LeafPatterns 2100
33 1046 ImmediateGratification 1500
44 1047 MedicineMan 2500
57 1048 ComfyChair 800
7 1049 ButtercupwithRedLip 400
1 1050 CattleRanch 10000
36 1051 NightVersion 7000
16 1052 AmericanRodeo 3500
6 1053 BlueEyedIndian 40000
50 1054 SnakeCharmer 4500
9 1055 StarlitEvening 9500
6 1056 CavalryIsComing 1900
66 1057 Untitled 4500
60 1058 TheGathering 250
17 1059 Dwelling 16000
42 1060 StorySticks 650
78 1061 UntitledMural 3520
41 1062 CowboyandSaddle 18000
3 1063 AsleepintheGarden 110000
51 1064 SpiritColumns 7000
47 1065 Moonlite 1300
76 1066 Untitled(stilllife) 19500
49 1067 OwlinFlight 7000
50 1068 Moonlight 9750
50 1069 Renaissance 5500
4 1070 Beginnings 27500
79 1071 RidetheRapids 300
24 1072 Funnel 4500
15 1073 DancingintheLight 4000
55 1074 StormontheRise 8000
6 1075 WesternBootsandSpurs 6000
79 1076 RidetheBronco 1500
6 1077 BullRiding 5200
28 1078 Chuckwagon 32000
62 1079 CarryingtheMail 8000
59 1080 TheDustBehind 18000
13 1081 ComingUnderFire 650
29 1082 SpringFlowers 20000
64 1083 Untitled 2500
23 1084 CrossingthePlattRiver 2200
63 1085 Traces 20000
67 1086 Untitled(desertlandscape) 18000
81 1087 ThreeWoman 20000
37 1088 Lessons 3700
53 1089 LifeLessons 4125
11 1090 OfftheGrid 8000
54 1091 StonePalette 11500
47 1092 DressingUp 1300
62 1093 Antelopes 12500
39 1094 LifeIsSweet 25000
61 1095 TheSpirit 20000
10 1096 CeremonialSticks 15000
75 1097 Untitled(Sea) 2800
56 1098 SweetProject 592
20 1099 WatchThatRattler 900
38 1100 HungryCowboys 750
58 1101 TheRedDoor 10000
14 1102 CryingHats 10000
1 1103 TrailEnd 8000
70 1104 Untitled 1800
80 1105 MeteorShow 10000
40 1106 HorseCorral 12500
35 1107 StrikingItRich 1750
77 1108 UntitledMural 400
22 1109 Friends 16000
62 1110 ThreeSisters 6500
72 1111 Untitled(manandcrucifix) 3200
27 1112 DarkCanyon 8000
50 1113 ShadowHouse 5500
50 1114 StorytellingattheCampfire 18000
25 1115 StarryNight 8500
30 1116 ApacheWarrior 23000
*********************************************************************
after sorting based on artist id
1 1038 SpringFlowers 800
1 1050 CattleRanch 10000
1 1103 TrailEnd 8000
2 1042 CoffeeontheTrail 7544
3 1013 Superstitions 78000
3 1021 BeadWall 14000
3 1034 BeaverPoleJumble 28000
3 1063 AsleepintheGarden 110000
4 1070 Beginnings 27500
5 1036 Blackhawk 25500
6 1017 Brittlecone 1300
6 1053 BlueEyedIndian 40000
6 1056 CavalryIsComing 1900
6 1075 WesternBootsandSpurs 6000
6 1077 BullRiding 5200
7 1049 ButtercupwithRedLip 400
8 1018 MountainScene 2500
9 1055 StarlitEvening 9500
10 1096 CeremonialSticks 15000
11 1090 OfftheGrid 8000
12 1003 SpringFlowers 2400
13 1081 ComingUnderFire 650
14 1039 Treachery 20000
14 1102 CryingHats 10000
15 1073 DancingintheLight 4000
16 1052 AmericanRodeo 3500
17 1059 Dwelling 16000
18 1005 TheHang 8000
19 1011 Eve 975
20 1099 WatchThatRattler 900
21 1037 FloatingWorld 2350
22 1109 Friends 16000
23 1084 CrossingthePlattRiver 2200
24 1072 Funnel 4500
25 1115 StarryNight 8500
26 1008 EndofthePath 1900
27 1112 DarkCanyon 8000
28 1009 Amen 3000
28 1030 AshBench 13000
28 1043 CreosoteBushes 18000
28 1078 Chuckwagon 32000
29 1041 NightVersion 3800
29 1082 SpringFlowers 20000
30 1116 ApacheWarrior 23000
31 1029 HorseshoeFalls 15000
32 1006 HouseRemembered 700
33 1046 ImmediateGratification 1500
34 1031 Inside/Out 3500
35 1107 StrikingItRich 1750
36 1051 NightVersion 7000
37 1088 Lessons 3700
38 1045 LeafPatterns 2100
38 1100 HungryCowboys 750
39 1094 LifeIsSweet 25000
40 1106 HorseCorral 12500
41 1062 CowboyandSaddle 18000
42 1032 RisingSun 2000
42 1060 StorySticks 650
43 1044 MexicanFiesta 14000
44 1047 MedicineMan 2500
45 1014 Plenty 500
46 1015 Punch 10000
47 1023 ShootingtheRapids 1300
47 1027 MountainClimber 4700
47 1035 Nature/Nurture 1300
47 1040 NightonthePraire 1300
47 1065 Moonlite 1300
47 1092 DressingUp 1300
48 1024 SpiritandNature 592
49 1067 OwlinFlight 7000
50 1001 RedRockMountain 18000
50 1028 Tiredcowboy 4700
50 1054 SnakeCharmer 4500
50 1068 Moonlight 9750
50 1069 Renaissance 5500
50 1113 ShadowHouse 5500
50 1114 StorytellingattheCampfire 18000
51 1064 SpiritColumns 7000
52 1002 Offerings 10000
53 1089 LifeLessons 4125
54 1091 StonePalette 11500
55 1074 StormontheRise 8000
56 1098 SweetProject 592
57 1048 ComfyChair 800
58 1101 TheRedDoor 10000
59 1080 TheDustBehind 18000
60 1058 TheGathering 250
61 1019 TheWhiteHeart 9300
61 1095 TheSpirit 20000
62 1079 CarryingtheMail 8000
62 1093 Antelopes 12500
62 1110 ThreeSisters 6500
63 1085 Traces 20000
64 1004 SeekingShelter 52000
64 1083 Untitled 2500
65 1016 Untitled 6000
66 1026 Untitled(couple) 4000
66 1057 Untitled 4500
67 1086 Untitled(desertlandscape) 18000
68 1025 ProfileofaWoman 625
69 1022 TheCowboy 4200
70 1104 Untitled 1800
71 1010 Untitled(landwithadobe) 800
72 1111 Untitled(manandcrucifix) 3200
73 1020 Untitled(Manholdingcoat) 3000
74 1012 ManonHorseback 8000
75 1097 Untitled(Sea) 2800
76 1066 Untitled(stilllife) 19500
77 1033 Untitled(Womanabstract) 2500
77 1108 UntitledMural 400
78 1061 UntitledMural 3520
79 1071 RidetheRapids 300
79 1076 RidetheBronco 1500
80 1105 MeteorShow 10000
81 1087 ThreeWoman 20000
82 1007 HomagetotheAncestors 1200
*******************************************************************
sorting using arrays class sort method
1 1038 SpringFlowers 800
1 1050 CattleRanch 10000
1 1103 TrailEnd 8000
2 1042 CoffeeontheTrail 7544
3 1013 Superstitions 78000
3 1021 BeadWall 14000
3 1034 BeaverPoleJumble 28000
3 1063 AsleepintheGarden 110000
4 1070 Beginnings 27500
5 1036 Blackhawk 25500
6 1017 Brittlecone 1300
6 1053 BlueEyedIndian 40000
6 1056 CavalryIsComing 1900
6 1075 WesternBootsandSpurs 6000
6 1077 BullRiding 5200
7 1049 ButtercupwithRedLip 400
8 1018 MountainScene 2500
9 1055 StarlitEvening 9500
10 1096 CeremonialSticks 15000
11 1090 OfftheGrid 8000
12 1003 SpringFlowers 2400
13 1081 ComingUnderFire 650
14 1039 Treachery 20000
14 1102 CryingHats 10000
15 1073 DancingintheLight 4000
16 1052 AmericanRodeo 3500
17 1059 Dwelling 16000
18 1005 TheHang 8000
19 1011 Eve 975
20 1099 WatchThatRattler 900
21 1037 FloatingWorld 2350
22 1109 Friends 16000
23 1084 CrossingthePlattRiver 2200
24 1072 Funnel 4500
25 1115 StarryNight 8500
26 1008 EndofthePath 1900
27 1112 DarkCanyon 8000
28 1009 Amen 3000
28 1030 AshBench 13000
28 1043 CreosoteBushes 18000
28 1078 Chuckwagon 32000
29 1041 NightVersion 3800
29 1082 SpringFlowers 20000
30 1116 ApacheWarrior 23000
31 1029 HorseshoeFalls 15000
32 1006 HouseRemembered 700
33 1046 ImmediateGratification 1500
34 1031 Inside/Out 3500
35 1107 StrikingItRich 1750
36 1051 NightVersion 7000
37 1088 Lessons 3700
38 1045 LeafPatterns 2100
38 1100 HungryCowboys 750
39 1094 LifeIsSweet 25000
40 1106 HorseCorral 12500
41 1062 CowboyandSaddle 18000
42 1032 RisingSun 2000
42 1060 StorySticks 650
43 1044 MexicanFiesta 14000
44 1047 MedicineMan 2500
45 1014 Plenty 500
46 1015 Punch 10000
47 1023 ShootingtheRapids 1300
47 1027 MountainClimber 4700
47 1035 Nature/Nurture 1300
47 1040 NightonthePraire 1300
47 1065 Moonlite 1300
47 1092 DressingUp 1300
48 1024 SpiritandNature 592
49 1067 OwlinFlight 7000
50 1001 RedRockMountain 18000
50 1028 Tiredcowboy 4700
50 1054 SnakeCharmer 4500
50 1068 Moonlight 9750
50 1069 Renaissance 5500
50 1113 ShadowHouse 5500
50 1114 StorytellingattheCampfire 18000
51 1064 SpiritColumns 7000
52 1002 Offerings 10000
53 1089 LifeLessons 4125
54 1091 StonePalette 11500
55 1074 StormontheRise 8000
56 1098 SweetProject 592
57 1048 ComfyChair 800
58 1101 TheRedDoor 10000
59 1080 TheDustBehind 18000
60 1058 TheGathering 250
61 1019 TheWhiteHeart 9300
61 1095 TheSpirit 20000
62 1079 CarryingtheMail 8000
62 1093 Antelopes 12500
62 1110 ThreeSisters 6500
63 1085 Traces 20000
64 1004 SeekingShelter 52000
64 1083 Untitled 2500
65 1016 Untitled 6000
66 1026 Untitled(couple) 4000
66 1057 Untitled 4500
67 1086 Untitled(desertlandscape) 18000
68 1025 ProfileofaWoman 625
69 1022 TheCowboy 4200
70 1104 Untitled 1800
71 1010 Untitled(landwithadobe) 800
72 1111 Untitled(manandcrucifix) 3200
73 1020 Untitled(Manholdingcoat) 3000
74 1012 ManonHorseback 8000
75 1097 Untitled(Sea) 2800
76 1066 Untitled(stilllife) 19500
77 1033 Untitled(Womanabstract) 2500
77 1108 UntitledMural 400
78 1061 UntitledMural 3520
79 1071 RidetheRapids 300
79 1076 RidetheBronco 1500
80 1105 MeteorShow 10000
81 1087 ThreeWoman 20000
82 1007 HomagetotheAncestors 1200

More Related Content

Similar to In this project, we combine the concepts of Recursion and Sorting. S.pdf

Kotlin for Android Developers
Kotlin for Android DevelopersKotlin for Android Developers
Kotlin for Android DevelopersHassan Abid
 
Beginning Haskell, Dive In, Its Not That Scary!
Beginning Haskell, Dive In, Its Not That Scary!Beginning Haskell, Dive In, Its Not That Scary!
Beginning Haskell, Dive In, Its Not That Scary!priort
 
The Groovy Puzzlers – The Complete 01 and 02 Seasons
The Groovy Puzzlers – The Complete 01 and 02 SeasonsThe Groovy Puzzlers – The Complete 01 and 02 Seasons
The Groovy Puzzlers – The Complete 01 and 02 SeasonsBaruch Sadogursky
 
The Ring programming language version 1.9 book - Part 56 of 210
The Ring programming language version 1.9 book - Part 56 of 210The Ring programming language version 1.9 book - Part 56 of 210
The Ring programming language version 1.9 book - Part 56 of 210Mahmoud Samir Fayed
 
Refactoring to Immutability
Refactoring to ImmutabilityRefactoring to Immutability
Refactoring to ImmutabilityKevlin Henney
 
Stupid Awesome Python Tricks
Stupid Awesome Python TricksStupid Awesome Python Tricks
Stupid Awesome Python TricksBryan Helmig
 
The Ring programming language version 1.3 book - Part 85 of 88
The Ring programming language version 1.3 book - Part 85 of 88The Ring programming language version 1.3 book - Part 85 of 88
The Ring programming language version 1.3 book - Part 85 of 88Mahmoud Samir Fayed
 
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...DevGAMM Conference
 
TDC218SP | Trilha Kotlin - DSLs in a Kotlin Way
TDC218SP | Trilha Kotlin - DSLs in a Kotlin WayTDC218SP | Trilha Kotlin - DSLs in a Kotlin Way
TDC218SP | Trilha Kotlin - DSLs in a Kotlin Waytdc-globalcode
 
Advance features of C++
Advance features of C++Advance features of C++
Advance features of C++vidyamittal
 
Cppt 101102014428-phpapp01
Cppt 101102014428-phpapp01Cppt 101102014428-phpapp01
Cppt 101102014428-phpapp01Getachew Ganfur
 
Groovy Ast Transformations (greach)
Groovy Ast Transformations (greach)Groovy Ast Transformations (greach)
Groovy Ast Transformations (greach)HamletDRC
 
Best Bugs from Games: Fellow Programmers' Mistakes
Best Bugs from Games: Fellow Programmers' MistakesBest Bugs from Games: Fellow Programmers' Mistakes
Best Bugs from Games: Fellow Programmers' MistakesAndrey Karpov
 
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
1sequences and sampling. Suppose we went to sample the x-axis from X.pdfrushabhshah600
 
The Ring programming language version 1.5.4 book - Part 47 of 185
The Ring programming language version 1.5.4 book - Part 47 of 185The Ring programming language version 1.5.4 book - Part 47 of 185
The Ring programming language version 1.5.4 book - Part 47 of 185Mahmoud Samir Fayed
 
The Ring programming language version 1.4.1 book - Part 13 of 31
The Ring programming language version 1.4.1 book - Part 13 of 31The Ring programming language version 1.4.1 book - Part 13 of 31
The Ring programming language version 1.4.1 book - Part 13 of 31Mahmoud Samir Fayed
 
Minimizing Decision Fatigue to Improve Team Productivity
Minimizing Decision Fatigue to Improve Team ProductivityMinimizing Decision Fatigue to Improve Team Productivity
Minimizing Decision Fatigue to Improve Team ProductivityDerek Lee Boire
 

Similar to In this project, we combine the concepts of Recursion and Sorting. S.pdf (20)

Functional Scala 2020
Functional Scala 2020Functional Scala 2020
Functional Scala 2020
 
Kotlin for Android Developers
Kotlin for Android DevelopersKotlin for Android Developers
Kotlin for Android Developers
 
Beginning Haskell, Dive In, Its Not That Scary!
Beginning Haskell, Dive In, Its Not That Scary!Beginning Haskell, Dive In, Its Not That Scary!
Beginning Haskell, Dive In, Its Not That Scary!
 
The Groovy Puzzlers – The Complete 01 and 02 Seasons
The Groovy Puzzlers – The Complete 01 and 02 SeasonsThe Groovy Puzzlers – The Complete 01 and 02 Seasons
The Groovy Puzzlers – The Complete 01 and 02 Seasons
 
The Ring programming language version 1.9 book - Part 56 of 210
The Ring programming language version 1.9 book - Part 56 of 210The Ring programming language version 1.9 book - Part 56 of 210
The Ring programming language version 1.9 book - Part 56 of 210
 
Pdr ppt
Pdr pptPdr ppt
Pdr ppt
 
SVGo workshop
SVGo workshopSVGo workshop
SVGo workshop
 
Refactoring to Immutability
Refactoring to ImmutabilityRefactoring to Immutability
Refactoring to Immutability
 
Stupid Awesome Python Tricks
Stupid Awesome Python TricksStupid Awesome Python Tricks
Stupid Awesome Python Tricks
 
The Ring programming language version 1.3 book - Part 85 of 88
The Ring programming language version 1.3 book - Part 85 of 88The Ring programming language version 1.3 book - Part 85 of 88
The Ring programming language version 1.3 book - Part 85 of 88
 
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...
Самые вкусные баги из игрового кода: как ошибаются наши коллеги-программисты ...
 
TDC218SP | Trilha Kotlin - DSLs in a Kotlin Way
TDC218SP | Trilha Kotlin - DSLs in a Kotlin WayTDC218SP | Trilha Kotlin - DSLs in a Kotlin Way
TDC218SP | Trilha Kotlin - DSLs in a Kotlin Way
 
Advance features of C++
Advance features of C++Advance features of C++
Advance features of C++
 
Cppt 101102014428-phpapp01
Cppt 101102014428-phpapp01Cppt 101102014428-phpapp01
Cppt 101102014428-phpapp01
 
Groovy Ast Transformations (greach)
Groovy Ast Transformations (greach)Groovy Ast Transformations (greach)
Groovy Ast Transformations (greach)
 
Best Bugs from Games: Fellow Programmers' Mistakes
Best Bugs from Games: Fellow Programmers' MistakesBest Bugs from Games: Fellow Programmers' Mistakes
Best Bugs from Games: Fellow Programmers' Mistakes
 
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
 
The Ring programming language version 1.5.4 book - Part 47 of 185
The Ring programming language version 1.5.4 book - Part 47 of 185The Ring programming language version 1.5.4 book - Part 47 of 185
The Ring programming language version 1.5.4 book - Part 47 of 185
 
The Ring programming language version 1.4.1 book - Part 13 of 31
The Ring programming language version 1.4.1 book - Part 13 of 31The Ring programming language version 1.4.1 book - Part 13 of 31
The Ring programming language version 1.4.1 book - Part 13 of 31
 
Minimizing Decision Fatigue to Improve Team Productivity
Minimizing Decision Fatigue to Improve Team ProductivityMinimizing Decision Fatigue to Improve Team Productivity
Minimizing Decision Fatigue to Improve Team Productivity
 

More from mallik3000

Explain how The Capitol Building (in D.C.) is a reflection of Greco-.pdf
Explain how The Capitol Building (in D.C.) is a reflection of Greco-.pdfExplain how The Capitol Building (in D.C.) is a reflection of Greco-.pdf
Explain how The Capitol Building (in D.C.) is a reflection of Greco-.pdfmallik3000
 
Exercise 14-3GURLEY CORPORATION Comparative Condensed Balance Sh.pdf
Exercise 14-3GURLEY CORPORATION Comparative Condensed Balance Sh.pdfExercise 14-3GURLEY CORPORATION Comparative Condensed Balance Sh.pdf
Exercise 14-3GURLEY CORPORATION Comparative Condensed Balance Sh.pdfmallik3000
 
estion 5 of 34 Sapling Learning Which is the correct name of the fo.pdf
estion 5 of 34 Sapling Learning Which is the correct name of the fo.pdfestion 5 of 34 Sapling Learning Which is the correct name of the fo.pdf
estion 5 of 34 Sapling Learning Which is the correct name of the fo.pdfmallik3000
 
Discuss the difference between the two levels of moral development. .pdf
Discuss the difference between the two levels of moral development. .pdfDiscuss the difference between the two levels of moral development. .pdf
Discuss the difference between the two levels of moral development. .pdfmallik3000
 
Diels-Alder Post-lab questions F17. 1) Why do the methylene protons.pdf
Diels-Alder Post-lab questions F17. 1) Why do the methylene protons.pdfDiels-Alder Post-lab questions F17. 1) Why do the methylene protons.pdf
Diels-Alder Post-lab questions F17. 1) Why do the methylene protons.pdfmallik3000
 
Create a Balance Sheet to record the following transactions for Tayl.pdf
Create a Balance Sheet to record the following transactions for Tayl.pdfCreate a Balance Sheet to record the following transactions for Tayl.pdf
Create a Balance Sheet to record the following transactions for Tayl.pdfmallik3000
 
Compare Plato and Aristotles philosophies of mathematics and relat.pdf
Compare Plato and Aristotles philosophies of mathematics and relat.pdfCompare Plato and Aristotles philosophies of mathematics and relat.pdf
Compare Plato and Aristotles philosophies of mathematics and relat.pdfmallik3000
 
Choose one of the evolutions of Critical Incident Technique (CIT) an.pdf
Choose one of the evolutions of Critical Incident Technique (CIT) an.pdfChoose one of the evolutions of Critical Incident Technique (CIT) an.pdf
Choose one of the evolutions of Critical Incident Technique (CIT) an.pdfmallik3000
 
Change the creature in this java program to a different one .pdf
Change the creature in this java program to a different one .pdfChange the creature in this java program to a different one .pdf
Change the creature in this java program to a different one .pdfmallik3000
 
Canon Corporation had the following static budget at the beginning o.pdf
Canon Corporation had the following static budget at the beginning o.pdfCanon Corporation had the following static budget at the beginning o.pdf
Canon Corporation had the following static budget at the beginning o.pdfmallik3000
 
Can someone please prove this equation is an identity. Cos^2.pdf
Can someone please prove this equation is an identity. Cos^2.pdfCan someone please prove this equation is an identity. Cos^2.pdf
Can someone please prove this equation is an identity. Cos^2.pdfmallik3000
 
Write a program that finds the max binary tree height. (This is an ex.pdf
Write a program that finds the max binary tree height. (This is an ex.pdfWrite a program that finds the max binary tree height. (This is an ex.pdf
Write a program that finds the max binary tree height. (This is an ex.pdfmallik3000
 
What happens when the JVM encounters a wait () callSolution=.pdf
What happens when the JVM encounters a wait () callSolution=.pdfWhat happens when the JVM encounters a wait () callSolution=.pdf
What happens when the JVM encounters a wait () callSolution=.pdfmallik3000
 
Write a program in c++ that maintains a telephone directory. The Tel.pdf
Write a program in c++ that maintains a telephone directory. The Tel.pdfWrite a program in c++ that maintains a telephone directory. The Tel.pdf
Write a program in c++ that maintains a telephone directory. The Tel.pdfmallik3000
 
Using the C++ programming language1. Implement the UnsortedList cl.pdf
Using the C++ programming language1. Implement the UnsortedList cl.pdfUsing the C++ programming language1. Implement the UnsortedList cl.pdf
Using the C++ programming language1. Implement the UnsortedList cl.pdfmallik3000
 
Why are supplies and inventory not considered plant assetsSolut.pdf
Why are supplies and inventory not considered plant assetsSolut.pdfWhy are supplies and inventory not considered plant assetsSolut.pdf
Why are supplies and inventory not considered plant assetsSolut.pdfmallik3000
 
What is the major purpose of the Federal Reserve System What is the.pdf
What is the major purpose of the Federal Reserve System What is the.pdfWhat is the major purpose of the Federal Reserve System What is the.pdf
What is the major purpose of the Federal Reserve System What is the.pdfmallik3000
 
What is the role of culture in leader development What culture fact.pdf
What is the role of culture in leader development What culture fact.pdfWhat is the role of culture in leader development What culture fact.pdf
What is the role of culture in leader development What culture fact.pdfmallik3000
 
What methods can IT use to make sure its initiatives have the suppor.pdf
What methods can IT use to make sure its initiatives have the suppor.pdfWhat methods can IT use to make sure its initiatives have the suppor.pdf
What methods can IT use to make sure its initiatives have the suppor.pdfmallik3000
 
What is IT infrastructure, and what are the stages and drivers of IT.pdf
What is IT infrastructure, and what are the stages and drivers of IT.pdfWhat is IT infrastructure, and what are the stages and drivers of IT.pdf
What is IT infrastructure, and what are the stages and drivers of IT.pdfmallik3000
 

More from mallik3000 (20)

Explain how The Capitol Building (in D.C.) is a reflection of Greco-.pdf
Explain how The Capitol Building (in D.C.) is a reflection of Greco-.pdfExplain how The Capitol Building (in D.C.) is a reflection of Greco-.pdf
Explain how The Capitol Building (in D.C.) is a reflection of Greco-.pdf
 
Exercise 14-3GURLEY CORPORATION Comparative Condensed Balance Sh.pdf
Exercise 14-3GURLEY CORPORATION Comparative Condensed Balance Sh.pdfExercise 14-3GURLEY CORPORATION Comparative Condensed Balance Sh.pdf
Exercise 14-3GURLEY CORPORATION Comparative Condensed Balance Sh.pdf
 
estion 5 of 34 Sapling Learning Which is the correct name of the fo.pdf
estion 5 of 34 Sapling Learning Which is the correct name of the fo.pdfestion 5 of 34 Sapling Learning Which is the correct name of the fo.pdf
estion 5 of 34 Sapling Learning Which is the correct name of the fo.pdf
 
Discuss the difference between the two levels of moral development. .pdf
Discuss the difference between the two levels of moral development. .pdfDiscuss the difference between the two levels of moral development. .pdf
Discuss the difference between the two levels of moral development. .pdf
 
Diels-Alder Post-lab questions F17. 1) Why do the methylene protons.pdf
Diels-Alder Post-lab questions F17. 1) Why do the methylene protons.pdfDiels-Alder Post-lab questions F17. 1) Why do the methylene protons.pdf
Diels-Alder Post-lab questions F17. 1) Why do the methylene protons.pdf
 
Create a Balance Sheet to record the following transactions for Tayl.pdf
Create a Balance Sheet to record the following transactions for Tayl.pdfCreate a Balance Sheet to record the following transactions for Tayl.pdf
Create a Balance Sheet to record the following transactions for Tayl.pdf
 
Compare Plato and Aristotles philosophies of mathematics and relat.pdf
Compare Plato and Aristotles philosophies of mathematics and relat.pdfCompare Plato and Aristotles philosophies of mathematics and relat.pdf
Compare Plato and Aristotles philosophies of mathematics and relat.pdf
 
Choose one of the evolutions of Critical Incident Technique (CIT) an.pdf
Choose one of the evolutions of Critical Incident Technique (CIT) an.pdfChoose one of the evolutions of Critical Incident Technique (CIT) an.pdf
Choose one of the evolutions of Critical Incident Technique (CIT) an.pdf
 
Change the creature in this java program to a different one .pdf
Change the creature in this java program to a different one .pdfChange the creature in this java program to a different one .pdf
Change the creature in this java program to a different one .pdf
 
Canon Corporation had the following static budget at the beginning o.pdf
Canon Corporation had the following static budget at the beginning o.pdfCanon Corporation had the following static budget at the beginning o.pdf
Canon Corporation had the following static budget at the beginning o.pdf
 
Can someone please prove this equation is an identity. Cos^2.pdf
Can someone please prove this equation is an identity. Cos^2.pdfCan someone please prove this equation is an identity. Cos^2.pdf
Can someone please prove this equation is an identity. Cos^2.pdf
 
Write a program that finds the max binary tree height. (This is an ex.pdf
Write a program that finds the max binary tree height. (This is an ex.pdfWrite a program that finds the max binary tree height. (This is an ex.pdf
Write a program that finds the max binary tree height. (This is an ex.pdf
 
What happens when the JVM encounters a wait () callSolution=.pdf
What happens when the JVM encounters a wait () callSolution=.pdfWhat happens when the JVM encounters a wait () callSolution=.pdf
What happens when the JVM encounters a wait () callSolution=.pdf
 
Write a program in c++ that maintains a telephone directory. The Tel.pdf
Write a program in c++ that maintains a telephone directory. The Tel.pdfWrite a program in c++ that maintains a telephone directory. The Tel.pdf
Write a program in c++ that maintains a telephone directory. The Tel.pdf
 
Using the C++ programming language1. Implement the UnsortedList cl.pdf
Using the C++ programming language1. Implement the UnsortedList cl.pdfUsing the C++ programming language1. Implement the UnsortedList cl.pdf
Using the C++ programming language1. Implement the UnsortedList cl.pdf
 
Why are supplies and inventory not considered plant assetsSolut.pdf
Why are supplies and inventory not considered plant assetsSolut.pdfWhy are supplies and inventory not considered plant assetsSolut.pdf
Why are supplies and inventory not considered plant assetsSolut.pdf
 
What is the major purpose of the Federal Reserve System What is the.pdf
What is the major purpose of the Federal Reserve System What is the.pdfWhat is the major purpose of the Federal Reserve System What is the.pdf
What is the major purpose of the Federal Reserve System What is the.pdf
 
What is the role of culture in leader development What culture fact.pdf
What is the role of culture in leader development What culture fact.pdfWhat is the role of culture in leader development What culture fact.pdf
What is the role of culture in leader development What culture fact.pdf
 
What methods can IT use to make sure its initiatives have the suppor.pdf
What methods can IT use to make sure its initiatives have the suppor.pdfWhat methods can IT use to make sure its initiatives have the suppor.pdf
What methods can IT use to make sure its initiatives have the suppor.pdf
 
What is IT infrastructure, and what are the stages and drivers of IT.pdf
What is IT infrastructure, and what are the stages and drivers of IT.pdfWhat is IT infrastructure, and what are the stages and drivers of IT.pdf
What is IT infrastructure, and what are the stages and drivers of IT.pdf
 

Recently uploaded

An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppCeline George
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....Ritu480198
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...Nguyen Thanh Tu Collection
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17Celine George
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhleson0603
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFVivekanand Anglo Vedic Academy
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital ManagementMBA Assignment Experts
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptxPoojaSen20
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxLimon Prince
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17Celine George
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文中 央社
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppCeline George
 

Recently uploaded (20)

An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 

In this project, we combine the concepts of Recursion and Sorting. S.pdf

  • 1. In this project, we combine the concepts of Recursion and Sorting. Since the Java Collection API provides various built-in sorting capabilities, so we will focus on Merge Sort and have it applied to a file. a) The input file that you are going to use is the tab-delimited text file "p1arts.txt". b) the output file that you are going to produce using File I/O is also the tabdelimited text file called "p6sortedArts.txt" which is sorted ascendingly on artistID and then artID both. Example follows: (sample output just for artistID) (have to sort both, ArtistID and then ArtID): ArtistID ArtID Title Appraised Value 1 1038 Spring Flowers 800 1 1050 Cattle Ranch 10000 1 1103 Trail End 8000 2 1042 Coffee on the Trail 7544 3 1013 Superstitions 78000 3 1021 Bead Wall 14000 3 1034 Beaver Pole Jumble 28000 3 1063 Asleep in the Garden 110000 Programming Steps: 1) Create a class called Art that implements Comparable interface. 2) Read part of the file and use Merge Sort to sort the array of Art and then write them to a file. 3) Read some more records from the file, sort them, and merge them with the sorted file on the disk. 4) Repeat the above step until it is all done. p1arts.txt: I am providing the sample programs that you might need: MergeSort.java: ArraySorter.java: Name.java: Artist.java: Driver.java: Solution //i added 2 classes for sorting public class Record implements Comparable {
  • 2. public int artId; public String title; public int artistId; public int AppraisedValue; /** * @param artId * @param title * @param artistId * @param appraisedValue */ public Record(int artId, String title, int artistId, int appraisedValue) { this.artId = artId; this.title = title; this.artistId = artistId; this.AppraisedValue = appraisedValue; } /* * (non-Javadoc) * * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + AppraisedValue; result = prime * result + artId; result = prime * result + artistId; result = prime * result + ((title == null) ? 0 : title.hashCode()); return result; } /* * (non-Javadoc) * * @see java.lang.Object#equals(java.lang.Object) */
  • 3. @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Record other = (Record) obj; if (AppraisedValue != other.AppraisedValue) return false; if (artId != other.artId) return false; if (artistId != other.artistId) return false; if (title == null) { if (other.title != null) return false; } else if (!title.equals(other.title)) return false; return true; } /* * (non-Javadoc) * * @see java.lang.Object#toString() */ @Override public String toString() { return artistId + " " + artId + " " + title + " " + AppraisedValue; } @Override public int compareTo(Record record) { // to sort ascending order return this.artistId - record.artistId; }
  • 4. } *********************************************************************** import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; public class Art { public static void main(String[] args) throws IOException { List records = new ArrayList(); BufferedReader reader = new BufferedReader(new FileReader(new File( "D:p6sortedArts.txt"))); String line = ""; while ((line = reader.readLine()) != null) { System.out.println(line); String[] words = line.split("s+"); int artId = Integer.parseInt(words[0]); String title = words[1]; int artistId = Integer.parseInt(words[2]); int appraisedValue = Integer.parseInt(words[3]); Record record = new Record(artId, title, artistId, appraisedValue); System.out.println(record); records.add(record); } System.out .println("before sorting using collections by using artist id"); for (Record record : records) { System.out.println(record); } System.out .println("********************************************************************* ");
  • 5. System.out.println("after sorting based on artist id"); // after sorting // collections uses internally merge sort Collections.sort(records); for (Record record : records) { System.out.println(record); } System.out .println("*******************************************************************"); // sorting using arrays based on artist id // it uses quicksort internally System.out.println("sorting using arrays class sort method"); Record[] array = records.toArray(new Record[records.size()]); Arrays.sort(array); for (int j = 0; j < array.length; j++) { System.out.println(array[j]); } reader.close(); } } ***************************************************************************** *********************** given text file (p6artists.txt) 1001 RedRockMountain 50 18000 1002 Offerings 52 10000 1003 SpringFlowers 12 2400 1004 SeekingShelter 64 52000 1005 TheHang 18 8000 1006 HouseRemembered 32 700 1007 HomagetotheAncestors 82 1200 1008 EndofthePath 26 1900 1009 Amen 28 3000 1010 Untitled(landwithadobe) 71 800 1011 Eve 19 975 1012 ManonHorseback 74 8000
  • 6. 1013 Superstitions 3 78000 1014 Plenty 45 500 1015 Punch 46 10000 1016 Untitled 65 6000 1017 Brittlecone 6 1300 1018 MountainScene 8 2500 1019 TheWhiteHeart 61 9300 1020 Untitled(Manholdingcoat) 73 3000 1021 BeadWall 3 14000 1022 TheCowboy 69 4200 1023 ShootingtheRapids 47 1300 1024 SpiritandNature 48 592 1025 ProfileofaWoman 68 625 1026 Untitled(couple) 66 4000 1027 MountainClimber 47 4700 1028 Tiredcowboy 50 4700 1029 HorseshoeFalls 31 15000 1030 AshBench 28 13000 1031 Inside/Out 34 3500 1032 RisingSun 42 2000 1033 Untitled(Womanabstract) 77 2500 1034 BeaverPoleJumble 3 28000 1035 Nature/Nurture 47 1300 1036 Blackhawk 5 25500 1037 FloatingWorld 21 2350 1038 SpringFlowers 1 800 1039 Treachery 14 20000 1040 NightonthePraire 47 1300 1041 NightVersion 29 3800 1042 CoffeeontheTrail 2 7544 1043 CreosoteBushes 28 18000 1044 MexicanFiesta 43 14000 1045 LeafPatterns 38 2100 1046 ImmediateGratification 33 1500 1047 MedicineMan 44 2500 1048 ComfyChair 57 800
  • 7. 1049 ButtercupwithRedLip 7 400 1050 CattleRanch 1 10000 1051 NightVersion 36 7000 1052 AmericanRodeo 16 3500 1053 BlueEyedIndian 6 40000 1054 SnakeCharmer 50 4500 1055 StarlitEvening 9 9500 1056 CavalryIsComing 6 1900 1057 Untitled 66 4500 1058 TheGathering 60 250 1059 Dwelling 17 16000 1060 StorySticks 42 650 1061 UntitledMural 78 3520 1062 CowboyandSaddle 41 18000 1063 AsleepintheGarden 3 110000 1064 SpiritColumns 51 7000 1065 Moonlite 47 1300 1066 Untitled(stilllife) 76 19500 1067 OwlinFlight 49 7000 1068 Moonlight 50 9750 1069 Renaissance 50 5500 1070 Beginnings 4 27500 1071 RidetheRapids 79 300 1072 Funnel 24 4500 1073 DancingintheLight 15 4000 1074 StormontheRise 55 8000 1075 WesternBootsandSpurs 6 6000 1076 RidetheBronco 79 1500 1077 BullRiding 6 5200 1078 Chuckwagon 28 32000 1079 CarryingtheMail 62 8000 1080 TheDustBehind 59 18000 1081 ComingUnderFire 13 650 1082 SpringFlowers 29 20000 1083 Untitled 64 2500 1084 CrossingthePlattRiver 23 2200
  • 8. 1085 Traces 63 20000 1086 Untitled(desertlandscape) 67 18000 1087 ThreeWoman 81 20000 1088 Lessons 37 3700 1089 LifeLessons 53 4125 1090 OfftheGrid 11 8000 1091 StonePalette 54 11500 1092 DressingUp 47 1300 1093 Antelopes 62 12500 1094 LifeIsSweet 39 25000 1095 TheSpirit 61 20000 1096 CeremonialSticks 10 15000 1097 Untitled(Sea) 75 2800 1098 SweetProject 56 592 1099 WatchThatRattler 20 900 1100 HungryCowboys 38 750 1101 TheRedDoor 58 10000 1102 CryingHats 14 10000 1103 TrailEnd 1 8000 1104 Untitled 70 1800 1105 MeteorShow 80 10000 1106 HorseCorral 40 12500 1107 StrikingItRich 35 1750 1108 UntitledMural 77 400 1109 Friends 22 16000 1110 ThreeSisters 62 6500 1111 Untitled(manandcrucifix) 72 3200 1112 DarkCanyon 27 8000 1113 ShadowHouse 50 5500 1114 StorytellingattheCampfire 50 18000 1115 StarryNight 25 8500 1116 ApacheWarrior 30 23000 output 1001 RedRockMountain 50 18000 50 1001 RedRockMountain 18000 1002 Offerings 52 10000
  • 9. 52 1002 Offerings 10000 1003 SpringFlowers 12 2400 12 1003 SpringFlowers 2400 1004 SeekingShelter 64 52000 64 1004 SeekingShelter 52000 1005 TheHang 18 8000 18 1005 TheHang 8000 1006 HouseRemembered 32 700 32 1006 HouseRemembered 700 1007 HomagetotheAncestors 82 1200 82 1007 HomagetotheAncestors 1200 1008 EndofthePath 26 1900 26 1008 EndofthePath 1900 1009 Amen 28 3000 28 1009 Amen 3000 1010 Untitled(landwithadobe) 71 800 71 1010 Untitled(landwithadobe) 800 1011 Eve 19 975 19 1011 Eve 975 1012 ManonHorseback 74 8000 74 1012 ManonHorseback 8000 1013 Superstitions 3 78000 3 1013 Superstitions 78000 1014 Plenty 45 500 45 1014 Plenty 500 1015 Punch 46 10000 46 1015 Punch 10000 1016 Untitled 65 6000 65 1016 Untitled 6000 1017 Brittlecone 6 1300 6 1017 Brittlecone 1300 1018 MountainScene 8 2500 8 1018 MountainScene 2500 1019 TheWhiteHeart 61 9300 61 1019 TheWhiteHeart 9300 1020 Untitled(Manholdingcoat) 73 3000
  • 10. 73 1020 Untitled(Manholdingcoat) 3000 1021 BeadWall 3 14000 3 1021 BeadWall 14000 1022 TheCowboy 69 4200 69 1022 TheCowboy 4200 1023 ShootingtheRapids 47 1300 47 1023 ShootingtheRapids 1300 1024 SpiritandNature 48 592 48 1024 SpiritandNature 592 1025 ProfileofaWoman 68 625 68 1025 ProfileofaWoman 625 1026 Untitled(couple) 66 4000 66 1026 Untitled(couple) 4000 1027 MountainClimber 47 4700 47 1027 MountainClimber 4700 1028 Tiredcowboy 50 4700 50 1028 Tiredcowboy 4700 1029 HorseshoeFalls 31 15000 31 1029 HorseshoeFalls 15000 1030 AshBench 28 13000 28 1030 AshBench 13000 1031 Inside/Out 34 3500 34 1031 Inside/Out 3500 1032 RisingSun 42 2000 42 1032 RisingSun 2000 1033 Untitled(Womanabstract) 77 2500 77 1033 Untitled(Womanabstract) 2500 1034 BeaverPoleJumble 3 28000 3 1034 BeaverPoleJumble 28000 1035 Nature/Nurture 47 1300 47 1035 Nature/Nurture 1300 1036 Blackhawk 5 25500 5 1036 Blackhawk 25500 1037 FloatingWorld 21 2350 21 1037 FloatingWorld 2350 1038 SpringFlowers 1 800
  • 11. 1 1038 SpringFlowers 800 1039 Treachery 14 20000 14 1039 Treachery 20000 1040 NightonthePraire 47 1300 47 1040 NightonthePraire 1300 1041 NightVersion 29 3800 29 1041 NightVersion 3800 1042 CoffeeontheTrail 2 7544 2 1042 CoffeeontheTrail 7544 1043 CreosoteBushes 28 18000 28 1043 CreosoteBushes 18000 1044 MexicanFiesta 43 14000 43 1044 MexicanFiesta 14000 1045 LeafPatterns 38 2100 38 1045 LeafPatterns 2100 1046 ImmediateGratification 33 1500 33 1046 ImmediateGratification 1500 1047 MedicineMan 44 2500 44 1047 MedicineMan 2500 1048 ComfyChair 57 800 57 1048 ComfyChair 800 1049 ButtercupwithRedLip 7 400 7 1049 ButtercupwithRedLip 400 1050 CattleRanch 1 10000 1 1050 CattleRanch 10000 1051 NightVersion 36 7000 36 1051 NightVersion 7000 1052 AmericanRodeo 16 3500 16 1052 AmericanRodeo 3500 1053 BlueEyedIndian 6 40000 6 1053 BlueEyedIndian 40000 1054 SnakeCharmer 50 4500 50 1054 SnakeCharmer 4500 1055 StarlitEvening 9 9500 9 1055 StarlitEvening 9500 1056 CavalryIsComing 6 1900
  • 12. 6 1056 CavalryIsComing 1900 1057 Untitled 66 4500 66 1057 Untitled 4500 1058 TheGathering 60 250 60 1058 TheGathering 250 1059 Dwelling 17 16000 17 1059 Dwelling 16000 1060 StorySticks 42 650 42 1060 StorySticks 650 1061 UntitledMural 78 3520 78 1061 UntitledMural 3520 1062 CowboyandSaddle 41 18000 41 1062 CowboyandSaddle 18000 1063 AsleepintheGarden 3 110000 3 1063 AsleepintheGarden 110000 1064 SpiritColumns 51 7000 51 1064 SpiritColumns 7000 1065 Moonlite 47 1300 47 1065 Moonlite 1300 1066 Untitled(stilllife) 76 19500 76 1066 Untitled(stilllife) 19500 1067 OwlinFlight 49 7000 49 1067 OwlinFlight 7000 1068 Moonlight 50 9750 50 1068 Moonlight 9750 1069 Renaissance 50 5500 50 1069 Renaissance 5500 1070 Beginnings 4 27500 4 1070 Beginnings 27500 1071 RidetheRapids 79 300 79 1071 RidetheRapids 300 1072 Funnel 24 4500 24 1072 Funnel 4500 1073 DancingintheLight 15 4000 15 1073 DancingintheLight 4000 1074 StormontheRise 55 8000
  • 13. 55 1074 StormontheRise 8000 1075 WesternBootsandSpurs 6 6000 6 1075 WesternBootsandSpurs 6000 1076 RidetheBronco 79 1500 79 1076 RidetheBronco 1500 1077 BullRiding 6 5200 6 1077 BullRiding 5200 1078 Chuckwagon 28 32000 28 1078 Chuckwagon 32000 1079 CarryingtheMail 62 8000 62 1079 CarryingtheMail 8000 1080 TheDustBehind 59 18000 59 1080 TheDustBehind 18000 1081 ComingUnderFire 13 650 13 1081 ComingUnderFire 650 1082 SpringFlowers 29 20000 29 1082 SpringFlowers 20000 1083 Untitled 64 2500 64 1083 Untitled 2500 1084 CrossingthePlattRiver 23 2200 23 1084 CrossingthePlattRiver 2200 1085 Traces 63 20000 63 1085 Traces 20000 1086 Untitled(desertlandscape) 67 18000 67 1086 Untitled(desertlandscape) 18000 1087 ThreeWoman 81 20000 81 1087 ThreeWoman 20000 1088 Lessons 37 3700 37 1088 Lessons 3700 1089 LifeLessons 53 4125 53 1089 LifeLessons 4125 1090 OfftheGrid 11 8000 11 1090 OfftheGrid 8000 1091 StonePalette 54 11500 54 1091 StonePalette 11500 1092 DressingUp 47 1300
  • 14. 47 1092 DressingUp 1300 1093 Antelopes 62 12500 62 1093 Antelopes 12500 1094 LifeIsSweet 39 25000 39 1094 LifeIsSweet 25000 1095 TheSpirit 61 20000 61 1095 TheSpirit 20000 1096 CeremonialSticks 10 15000 10 1096 CeremonialSticks 15000 1097 Untitled(Sea) 75 2800 75 1097 Untitled(Sea) 2800 1098 SweetProject 56 592 56 1098 SweetProject 592 1099 WatchThatRattler 20 900 20 1099 WatchThatRattler 900 1100 HungryCowboys 38 750 38 1100 HungryCowboys 750 1101 TheRedDoor 58 10000 58 1101 TheRedDoor 10000 1102 CryingHats 14 10000 14 1102 CryingHats 10000 1103 TrailEnd 1 8000 1 1103 TrailEnd 8000 1104 Untitled 70 1800 70 1104 Untitled 1800 1105 MeteorShow 80 10000 80 1105 MeteorShow 10000 1106 HorseCorral 40 12500 40 1106 HorseCorral 12500 1107 StrikingItRich 35 1750 35 1107 StrikingItRich 1750 1108 UntitledMural 77 400 77 1108 UntitledMural 400 1109 Friends 22 16000 22 1109 Friends 16000 1110 ThreeSisters 62 6500
  • 15. 62 1110 ThreeSisters 6500 1111 Untitled(manandcrucifix) 72 3200 72 1111 Untitled(manandcrucifix) 3200 1112 DarkCanyon 27 8000 27 1112 DarkCanyon 8000 1113 ShadowHouse 50 5500 50 1113 ShadowHouse 5500 1114 StorytellingattheCampfire 50 18000 50 1114 StorytellingattheCampfire 18000 1115 StarryNight 25 8500 25 1115 StarryNight 8500 1116 ApacheWarrior 30 23000 30 1116 ApacheWarrior 23000 before sorting using collections by using artist id 50 1001 RedRockMountain 18000 52 1002 Offerings 10000 12 1003 SpringFlowers 2400 64 1004 SeekingShelter 52000 18 1005 TheHang 8000 32 1006 HouseRemembered 700 82 1007 HomagetotheAncestors 1200 26 1008 EndofthePath 1900 28 1009 Amen 3000 71 1010 Untitled(landwithadobe) 800 19 1011 Eve 975 74 1012 ManonHorseback 8000 3 1013 Superstitions 78000 45 1014 Plenty 500 46 1015 Punch 10000 65 1016 Untitled 6000 6 1017 Brittlecone 1300 8 1018 MountainScene 2500 61 1019 TheWhiteHeart 9300 73 1020 Untitled(Manholdingcoat) 3000 3 1021 BeadWall 14000 69 1022 TheCowboy 4200
  • 16. 47 1023 ShootingtheRapids 1300 48 1024 SpiritandNature 592 68 1025 ProfileofaWoman 625 66 1026 Untitled(couple) 4000 47 1027 MountainClimber 4700 50 1028 Tiredcowboy 4700 31 1029 HorseshoeFalls 15000 28 1030 AshBench 13000 34 1031 Inside/Out 3500 42 1032 RisingSun 2000 77 1033 Untitled(Womanabstract) 2500 3 1034 BeaverPoleJumble 28000 47 1035 Nature/Nurture 1300 5 1036 Blackhawk 25500 21 1037 FloatingWorld 2350 1 1038 SpringFlowers 800 14 1039 Treachery 20000 47 1040 NightonthePraire 1300 29 1041 NightVersion 3800 2 1042 CoffeeontheTrail 7544 28 1043 CreosoteBushes 18000 43 1044 MexicanFiesta 14000 38 1045 LeafPatterns 2100 33 1046 ImmediateGratification 1500 44 1047 MedicineMan 2500 57 1048 ComfyChair 800 7 1049 ButtercupwithRedLip 400 1 1050 CattleRanch 10000 36 1051 NightVersion 7000 16 1052 AmericanRodeo 3500 6 1053 BlueEyedIndian 40000 50 1054 SnakeCharmer 4500 9 1055 StarlitEvening 9500 6 1056 CavalryIsComing 1900 66 1057 Untitled 4500 60 1058 TheGathering 250
  • 17. 17 1059 Dwelling 16000 42 1060 StorySticks 650 78 1061 UntitledMural 3520 41 1062 CowboyandSaddle 18000 3 1063 AsleepintheGarden 110000 51 1064 SpiritColumns 7000 47 1065 Moonlite 1300 76 1066 Untitled(stilllife) 19500 49 1067 OwlinFlight 7000 50 1068 Moonlight 9750 50 1069 Renaissance 5500 4 1070 Beginnings 27500 79 1071 RidetheRapids 300 24 1072 Funnel 4500 15 1073 DancingintheLight 4000 55 1074 StormontheRise 8000 6 1075 WesternBootsandSpurs 6000 79 1076 RidetheBronco 1500 6 1077 BullRiding 5200 28 1078 Chuckwagon 32000 62 1079 CarryingtheMail 8000 59 1080 TheDustBehind 18000 13 1081 ComingUnderFire 650 29 1082 SpringFlowers 20000 64 1083 Untitled 2500 23 1084 CrossingthePlattRiver 2200 63 1085 Traces 20000 67 1086 Untitled(desertlandscape) 18000 81 1087 ThreeWoman 20000 37 1088 Lessons 3700 53 1089 LifeLessons 4125 11 1090 OfftheGrid 8000 54 1091 StonePalette 11500 47 1092 DressingUp 1300 62 1093 Antelopes 12500 39 1094 LifeIsSweet 25000
  • 18. 61 1095 TheSpirit 20000 10 1096 CeremonialSticks 15000 75 1097 Untitled(Sea) 2800 56 1098 SweetProject 592 20 1099 WatchThatRattler 900 38 1100 HungryCowboys 750 58 1101 TheRedDoor 10000 14 1102 CryingHats 10000 1 1103 TrailEnd 8000 70 1104 Untitled 1800 80 1105 MeteorShow 10000 40 1106 HorseCorral 12500 35 1107 StrikingItRich 1750 77 1108 UntitledMural 400 22 1109 Friends 16000 62 1110 ThreeSisters 6500 72 1111 Untitled(manandcrucifix) 3200 27 1112 DarkCanyon 8000 50 1113 ShadowHouse 5500 50 1114 StorytellingattheCampfire 18000 25 1115 StarryNight 8500 30 1116 ApacheWarrior 23000 ********************************************************************* after sorting based on artist id 1 1038 SpringFlowers 800 1 1050 CattleRanch 10000 1 1103 TrailEnd 8000 2 1042 CoffeeontheTrail 7544 3 1013 Superstitions 78000 3 1021 BeadWall 14000 3 1034 BeaverPoleJumble 28000 3 1063 AsleepintheGarden 110000 4 1070 Beginnings 27500 5 1036 Blackhawk 25500 6 1017 Brittlecone 1300 6 1053 BlueEyedIndian 40000
  • 19. 6 1056 CavalryIsComing 1900 6 1075 WesternBootsandSpurs 6000 6 1077 BullRiding 5200 7 1049 ButtercupwithRedLip 400 8 1018 MountainScene 2500 9 1055 StarlitEvening 9500 10 1096 CeremonialSticks 15000 11 1090 OfftheGrid 8000 12 1003 SpringFlowers 2400 13 1081 ComingUnderFire 650 14 1039 Treachery 20000 14 1102 CryingHats 10000 15 1073 DancingintheLight 4000 16 1052 AmericanRodeo 3500 17 1059 Dwelling 16000 18 1005 TheHang 8000 19 1011 Eve 975 20 1099 WatchThatRattler 900 21 1037 FloatingWorld 2350 22 1109 Friends 16000 23 1084 CrossingthePlattRiver 2200 24 1072 Funnel 4500 25 1115 StarryNight 8500 26 1008 EndofthePath 1900 27 1112 DarkCanyon 8000 28 1009 Amen 3000 28 1030 AshBench 13000 28 1043 CreosoteBushes 18000 28 1078 Chuckwagon 32000 29 1041 NightVersion 3800 29 1082 SpringFlowers 20000 30 1116 ApacheWarrior 23000 31 1029 HorseshoeFalls 15000 32 1006 HouseRemembered 700 33 1046 ImmediateGratification 1500 34 1031 Inside/Out 3500
  • 20. 35 1107 StrikingItRich 1750 36 1051 NightVersion 7000 37 1088 Lessons 3700 38 1045 LeafPatterns 2100 38 1100 HungryCowboys 750 39 1094 LifeIsSweet 25000 40 1106 HorseCorral 12500 41 1062 CowboyandSaddle 18000 42 1032 RisingSun 2000 42 1060 StorySticks 650 43 1044 MexicanFiesta 14000 44 1047 MedicineMan 2500 45 1014 Plenty 500 46 1015 Punch 10000 47 1023 ShootingtheRapids 1300 47 1027 MountainClimber 4700 47 1035 Nature/Nurture 1300 47 1040 NightonthePraire 1300 47 1065 Moonlite 1300 47 1092 DressingUp 1300 48 1024 SpiritandNature 592 49 1067 OwlinFlight 7000 50 1001 RedRockMountain 18000 50 1028 Tiredcowboy 4700 50 1054 SnakeCharmer 4500 50 1068 Moonlight 9750 50 1069 Renaissance 5500 50 1113 ShadowHouse 5500 50 1114 StorytellingattheCampfire 18000 51 1064 SpiritColumns 7000 52 1002 Offerings 10000 53 1089 LifeLessons 4125 54 1091 StonePalette 11500 55 1074 StormontheRise 8000 56 1098 SweetProject 592 57 1048 ComfyChair 800
  • 21. 58 1101 TheRedDoor 10000 59 1080 TheDustBehind 18000 60 1058 TheGathering 250 61 1019 TheWhiteHeart 9300 61 1095 TheSpirit 20000 62 1079 CarryingtheMail 8000 62 1093 Antelopes 12500 62 1110 ThreeSisters 6500 63 1085 Traces 20000 64 1004 SeekingShelter 52000 64 1083 Untitled 2500 65 1016 Untitled 6000 66 1026 Untitled(couple) 4000 66 1057 Untitled 4500 67 1086 Untitled(desertlandscape) 18000 68 1025 ProfileofaWoman 625 69 1022 TheCowboy 4200 70 1104 Untitled 1800 71 1010 Untitled(landwithadobe) 800 72 1111 Untitled(manandcrucifix) 3200 73 1020 Untitled(Manholdingcoat) 3000 74 1012 ManonHorseback 8000 75 1097 Untitled(Sea) 2800 76 1066 Untitled(stilllife) 19500 77 1033 Untitled(Womanabstract) 2500 77 1108 UntitledMural 400 78 1061 UntitledMural 3520 79 1071 RidetheRapids 300 79 1076 RidetheBronco 1500 80 1105 MeteorShow 10000 81 1087 ThreeWoman 20000 82 1007 HomagetotheAncestors 1200 ******************************************************************* sorting using arrays class sort method 1 1038 SpringFlowers 800 1 1050 CattleRanch 10000
  • 22. 1 1103 TrailEnd 8000 2 1042 CoffeeontheTrail 7544 3 1013 Superstitions 78000 3 1021 BeadWall 14000 3 1034 BeaverPoleJumble 28000 3 1063 AsleepintheGarden 110000 4 1070 Beginnings 27500 5 1036 Blackhawk 25500 6 1017 Brittlecone 1300 6 1053 BlueEyedIndian 40000 6 1056 CavalryIsComing 1900 6 1075 WesternBootsandSpurs 6000 6 1077 BullRiding 5200 7 1049 ButtercupwithRedLip 400 8 1018 MountainScene 2500 9 1055 StarlitEvening 9500 10 1096 CeremonialSticks 15000 11 1090 OfftheGrid 8000 12 1003 SpringFlowers 2400 13 1081 ComingUnderFire 650 14 1039 Treachery 20000 14 1102 CryingHats 10000 15 1073 DancingintheLight 4000 16 1052 AmericanRodeo 3500 17 1059 Dwelling 16000 18 1005 TheHang 8000 19 1011 Eve 975 20 1099 WatchThatRattler 900 21 1037 FloatingWorld 2350 22 1109 Friends 16000 23 1084 CrossingthePlattRiver 2200 24 1072 Funnel 4500 25 1115 StarryNight 8500 26 1008 EndofthePath 1900 27 1112 DarkCanyon 8000 28 1009 Amen 3000
  • 23. 28 1030 AshBench 13000 28 1043 CreosoteBushes 18000 28 1078 Chuckwagon 32000 29 1041 NightVersion 3800 29 1082 SpringFlowers 20000 30 1116 ApacheWarrior 23000 31 1029 HorseshoeFalls 15000 32 1006 HouseRemembered 700 33 1046 ImmediateGratification 1500 34 1031 Inside/Out 3500 35 1107 StrikingItRich 1750 36 1051 NightVersion 7000 37 1088 Lessons 3700 38 1045 LeafPatterns 2100 38 1100 HungryCowboys 750 39 1094 LifeIsSweet 25000 40 1106 HorseCorral 12500 41 1062 CowboyandSaddle 18000 42 1032 RisingSun 2000 42 1060 StorySticks 650 43 1044 MexicanFiesta 14000 44 1047 MedicineMan 2500 45 1014 Plenty 500 46 1015 Punch 10000 47 1023 ShootingtheRapids 1300 47 1027 MountainClimber 4700 47 1035 Nature/Nurture 1300 47 1040 NightonthePraire 1300 47 1065 Moonlite 1300 47 1092 DressingUp 1300 48 1024 SpiritandNature 592 49 1067 OwlinFlight 7000 50 1001 RedRockMountain 18000 50 1028 Tiredcowboy 4700 50 1054 SnakeCharmer 4500 50 1068 Moonlight 9750
  • 24. 50 1069 Renaissance 5500 50 1113 ShadowHouse 5500 50 1114 StorytellingattheCampfire 18000 51 1064 SpiritColumns 7000 52 1002 Offerings 10000 53 1089 LifeLessons 4125 54 1091 StonePalette 11500 55 1074 StormontheRise 8000 56 1098 SweetProject 592 57 1048 ComfyChair 800 58 1101 TheRedDoor 10000 59 1080 TheDustBehind 18000 60 1058 TheGathering 250 61 1019 TheWhiteHeart 9300 61 1095 TheSpirit 20000 62 1079 CarryingtheMail 8000 62 1093 Antelopes 12500 62 1110 ThreeSisters 6500 63 1085 Traces 20000 64 1004 SeekingShelter 52000 64 1083 Untitled 2500 65 1016 Untitled 6000 66 1026 Untitled(couple) 4000 66 1057 Untitled 4500 67 1086 Untitled(desertlandscape) 18000 68 1025 ProfileofaWoman 625 69 1022 TheCowboy 4200 70 1104 Untitled 1800 71 1010 Untitled(landwithadobe) 800 72 1111 Untitled(manandcrucifix) 3200 73 1020 Untitled(Manholdingcoat) 3000 74 1012 ManonHorseback 8000 75 1097 Untitled(Sea) 2800 76 1066 Untitled(stilllife) 19500 77 1033 Untitled(Womanabstract) 2500 77 1108 UntitledMural 400
  • 25. 78 1061 UntitledMural 3520 79 1071 RidetheRapids 300 79 1076 RidetheBronco 1500 80 1105 MeteorShow 10000 81 1087 ThreeWoman 20000 82 1007 HomagetotheAncestors 1200