Top Posters
Since Sunday
a
5
k
5
c
5
B
5
l
5
C
4
s
4
a
4
t
4
i
4
r
4
r
4
A free membership is required to access uploaded content. Login or Register.

Project 6 Pseudocode

Uploaded: 5 years ago
Contributor: gvan9
Category: Computer Engineering
Type: Other
Rating: (1)
Helpful 1 
Unhelpful
Filename:   Project 6 Pseudocode.txt (1.83 kB)
Credit Cost: 1
Views: 167
Last Download: N/A
Transcript
?Gavin Poulton, None. Lab 013, 12/4/2018 Make a vector of dots, then change individual coordinates to the letters Struct point(){ Double X Double Y } Struct Planet(){ Int Id (point, the struct) location String Name Char Symbol } ofstream output(journey.txt); InputData(){ String namesFile String locationsFile Cout “Enter Locations Filename: “ Cin locationsFile Cout “enter names filename: “ Cin names Ifstream namesInput(namesFile); Ifstream locationsInput(locationsFile); If(!namesInput.is_open() or !locationsInput.is_open()){ Cout “Input file could not be opened” Return 1 } While(readinplanets){ } Vector string Names Vector double Locations } CorrectErrors(){ Names.remove “XX” names.find “underscores” Names.replace “spaces” } If(ids match in the struct){ Overwrite name } Struct(mapInfo){ (pass in this info wherever you need to pass in the functions) Startrow Startcolumn Endrow Endcolumn Numrows numcolumns } Fin >>numrows Fin >>numcolumns CreateMap(){ } CalculateDistance(){ If(){ } Else{ Algorithm 2 } } Int visitedplanets = 0; (increase this value every time you visit a planet) CalculateRoute(){ For(planets that haven’t been visited yet){ While(iterating through the planets filtered by the forloop){ Find closest planet that has not been visited(findclosest()) Visit it Mark as visited Print out planet name and where you are } } } PrintOutput(){ } Int main(){ InputData() }

Related Downloads
Explore
Post your homework questions and get free online help from our incredible volunteers
  917 People Browsing
Your Opinion
What's your favorite coffee beverage?
Votes: 274