Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
Project 3 Star Gazing
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Eric Walsh
Project 3 Star Gazing
Commits
6abdd7bc
Commit
6abdd7bc
authored
Mar 20, 2019
by
Elizabeth Ventura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
autosave
parent
eda116fa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
340 additions
and
3 deletions
+340
-3
Final stuff/Stars.cpp
Final stuff/Stars.cpp
+299
-0
Final stuff/Stars.h
Final stuff/Stars.h
+10
-0
Star Array/main.cpp
Star Array/main.cpp
+31
-3
No files found.
Final stuff/Stars.cpp
View file @
6abdd7bc
...
...
@@ -570,3 +570,302 @@ void Stars::UrsaMajor16() { //done
cout
<<
endl
;
}
}
void
Hercules17
()
{
//done
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
2
][
10
]
=
'*'
;
stars
[
7
][
6
]
=
'*'
;
stars
[
8
][
14
]
=
'*'
;
stars
[
9
][
16
]
=
'*'
;
stars
[
13
][
20
]
=
'*'
;
stars
[
12
][
26
]
=
'*'
;
stars
[
7
][
25
]
=
'*'
;
stars
[
5
][
26
]
=
'*'
;
stars
[
2
][
28
]
=
'*'
;
stars
[
3
][
31
]
=
'*'
;
stars
[
4
][
35
]
=
'*'
;
stars
[
17
][
16
]
=
'*'
;
stars
[
16
][
12
]
=
'*'
;
stars
[
15
][
8
]
=
'*'
;
stars
[
14
][
6
]
=
'*'
;
stars
[
15
][
3
]
=
'*'
;
stars
[
19
][
28
]
=
'*'
;
stars
[
20
][
30
]
=
'*'
;
stars
[
23
][
30
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
}
void
Cygnus18
()
{
//done
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
2
][
29
]
=
'*'
;
stars
[
3
][
26
]
=
'*'
;
stars
[
8
][
26
]
=
'*'
;
stars
[
12
][
20
]
=
'*'
;
//middle point
stars
[
16
][
11
]
=
'*'
;
stars
[
17
][
2
]
=
'*'
;
stars
[
7
][
17
]
=
'*'
;
stars
[
8
][
11
]
=
'*'
;
stars
[
11
][
8
]
=
'*'
;
stars
[
16
][
29
]
=
'*'
;
stars
[
20
][
38
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
}
void
Pavo19
()
{
//done
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
11
][
3
]
=
'*'
;
stars
[
1
][
11
]
=
'*'
;
stars
[
10
][
12
]
=
'*'
;
stars
[
9
][
19
]
=
'*'
;
stars
[
5
][
28
]
=
'*'
;
stars
[
5
][
34
]
=
'*'
;
stars
[
8
][
37
]
=
'*'
;
stars
[
9
][
39
]
=
'*'
;
stars
[
10
][
27
]
=
'*'
;
stars
[
17
][
18
]
=
'*'
;
stars
[
16
][
27
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
}
void
Centaurus20
()
{
//done
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
1
][
12
]
=
'*'
;
stars
[
3
][
9
]
=
'*'
;
stars
[
5
][
16
]
=
'*'
;
stars
[
6
][
8
]
=
'*'
;
stars
[
7
][
4
]
=
'*'
;
stars
[
8
][
19
]
=
'*'
;
stars
[
5
][
19
]
=
'*'
;
stars
[
4
][
19
]
=
'*'
;
stars
[
3
][
24
]
=
'*'
;
stars
[
1
][
26
]
=
'*'
;
stars
[
3
][
33
]
=
'*'
;
stars
[
10
][
30
]
=
'*'
;
stars
[
11
][
31
]
=
'*'
;
stars
[
13
][
33
]
=
'*'
;
stars
[
12
][
35
]
=
'*'
;
stars
[
19
][
37
]
=
'*'
;
stars
[
16
][
39
]
=
'*'
;
stars
[
12
][
22
]
=
'*'
;
stars
[
16
][
19
]
=
'*'
;
stars
[
17
][
12
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
}
void
CanesVenatici21
()
{
//done
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
9
][
9
]
=
'*'
;
stars
[
10
][
11
]
=
'*'
;
stars
[
12
][
20
]
=
'*'
;
stars
[
8
][
30
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
}
void
Lynx22
()
{
//done
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
3
][
37
]
=
'*'
;
stars
[
5
][
31
]
=
'*'
;
stars
[
11
][
27
]
=
'*'
;
stars
[
10
][
17
]
=
'*'
;
stars
[
14
][
13
]
=
'*'
;
stars
[
15
][
5
]
=
'*'
;
stars
[
19
][
2
]
=
'*'
;
stars
[
21
][
1
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
}
void
Auriga23
()
{
//done
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
3
][
13
]
=
'*'
;
stars
[
8
][
25
]
=
'*'
;
stars
[
9
][
9
]
=
'*'
;
stars
[
15
][
7
]
=
'*'
;
stars
[
22
][
20
]
=
'*'
;
stars
[
16
][
30
]
=
'*'
;
stars
[
9
][
29
]
=
'*'
;
stars
[
11
][
29
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
}
void
Hydra24
()
{
//done
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
2
][
38
]
=
'*'
;
stars
[
2
][
39
]
=
'*'
;
stars
[
3
][
38
]
=
'*'
;
stars
[
3
][
39
]
=
'*'
;
stars
[
2
][
37
]
=
'*'
;
stars
[
4
][
34
]
=
'*'
;
stars
[
5
][
29
]
=
'*'
;
stars
[
8
][
30
]
=
'*'
;
stars
[
10
][
25
]
=
'*'
;
stars
[
9
][
24
]
=
'*'
;
stars
[
8
][
22
]
=
'*'
;
stars
[
10
][
19
]
=
'*'
;
stars
[
9
][
15
]
=
'*'
;
stars
[
10
][
14
]
=
'*'
;
stars
[
12
][
12
]
=
'*'
;
stars
[
16
][
9
]
=
'*'
;
stars
[
17
][
6
]
=
'*'
;
stars
[
15
][
1
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
}
void
Vela25
()
{
//done
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
5
][
20
]
=
'*'
;
stars
[
7
][
10
]
=
'*'
;
stars
[
13
][
4
]
=
'*'
;
stars
[
16
][
17
]
=
'*'
;
stars
[
17
][
25
]
=
'*'
;
stars
[
17
][
33
]
=
'*'
;
stars
[
11
][
39
]
=
'*'
;
stars
[
8
][
28
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
}
\ No newline at end of file
Final stuff/Stars.h
View file @
6abdd7bc
...
...
@@ -30,6 +30,16 @@ class Stars {
void
Pisces14
();
void
UrsaMinor15
();
void
UrsaMajor16
();
//// new
void
Hercules17
();
void
Cygnus18
();
void
Pavo19
();
void
Centaurus20
();
void
CanesVenatici21
();
void
Lynx22
();
void
Auriga23
();
void
Hydra24
();
void
Vela25
();
private:
char
stars
[
ROW
][
COL
];
...
...
Star Array/main.cpp
View file @
6abdd7bc
...
...
@@ -4,13 +4,41 @@
* **************************/
#include <iostream>
#include "Stars.h"
//
#include "Stars.h"
using
namespace
std
;
int
main
()
{
Stars
s
;
s
.
Pegasus
();
int
ROW
=
24
;
int
COL
=
40
;
char
stars
[
ROW
][
COL
];
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
stars
[
row
][
col
]
=
' '
;
}
}
stars
[
5
][
20
]
=
'*'
;
stars
[
7
][
10
]
=
'*'
;
stars
[
13
][
4
]
=
'*'
;
stars
[
16
][
17
]
=
'*'
;
stars
[
17
][
25
]
=
'*'
;
stars
[
17
][
33
]
=
'*'
;
stars
[
11
][
39
]
=
'*'
;
stars
[
8
][
28
]
=
'*'
;
for
(
int
row
=
0
;
row
<
24
;
row
++
)
{
for
(
int
col
=
0
;
col
<
40
;
col
++
)
{
cout
<<
stars
[
row
][
col
];
}
cout
<<
endl
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment