Skip to content

Commit 82564c2

Browse files
committed
Initial project baseline, requirements, and rubric
0 parents  commit 82564c2

File tree

2 files changed

+128
-0
lines changed

2 files changed

+128
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Project 04: Solar System
2+
Let's make a planetary system!
3+
4+
## Baseline
5+
- Create a `Planet` class with a name attribute. You should be able to instantiate a new `Planet` object with an associated name.
6+
7+
# Wave 1
8+
## Primary Requirements
9+
- Get creative! Give each instance of `Planet` diameters, mass, moons.. whatever! __Allow these attributes to be set using a hash in initialize.__
10+
- You should be able to create many different planets with different properties, like Mercury, Venus, Earth, Mars, Jupiter, etc.
11+
12+
## Optional Enhancements
13+
- Give each planet a rate of solar rotation
14+
- Give each planet a `@distance_from_the_sun` attribute
15+
16+
- Write a program that asks for user input to query the planets:
17+
- First, ask the user to select a planet they'd like to learn about.
18+
- Present the user with a list of planets from which they can choose. Something like:
19+
- `1. Mercury, 2. Venus, 3. Earth, 4. Secret Earth, 5. Mars, 6. Jupiter, ... 13. Exit`
20+
- Provide the user with well formatted information about the planet (diameter, mass, number of moons, primary export, etc.)
21+
- Then ask the user for another planet.
22+
23+
# Wave 2
24+
## Primary Requirements
25+
- Create a `SolarSystem` class that has an attribute `planets` that has zero to many `Planet` instances. There are a few different options for how to associate the planets with your solar system:
26+
- Initialize the list of planets in the constructor of the solar system
27+
- Create a method that adds a single planet to a solar system
28+
- Create a method that adds a list of planets to the existing list of planets
29+
30+
## Optional Enhancements
31+
- Ensure that the each planet has a `@distance_from_the_sun` attribute. Using this data, add a method to determine the distance from any other planet (assuming planets are in a straight line from the sun)
32+
- Give your solar system a formation year (in earth years).
33+
- Define a method that returns the local year of the planet based on it's rotation since the beginning of the solar system
34+
35+
36+
### [Rubric](rubric.md)

rubric.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# SOLAR SYSTEM RUBRIC
2+
3+
1=Beginner, 2=Proficient, 3=Master
4+
5+
### PROJECT LEARNING GOALS
6+
7+
| Rating | Content | Description
8+
|--------|-------------------|-----------------------------------------------------------
9+
| | Variables | Variable names are logical, clear, and in snake case. Variables are not needlessly assigned or reassigned. Instance variables are used for visibility within all methods in the class. Local variables are used for visibility only to a single code block or method. ([variable examples](#variables)).
10+
| | Loops | Loops control the flow of the code, keeping the user on track, and continuing the program until an appropriate end point.
11+
| | Data Types | Hashes, arrays, strings, symbols, numbers, and booleans used appropriately. ([data type examples](#data-types))
12+
| | Conditionals & Operators | Logical and mathematical operators guide program flow efficiently and properly deal with edge cases ([operator/conditional examples](#conditionals--operators)).
13+
| | Methods | Methods are designed and implemented with a single purpose. Methods are logically named in snake case.
14+
| | Classes | Classes are used to represent a single object, and contain all of the functionality and information associated with that object.
15+
16+
### Examples
17+
18+
#### Variables
19+
```ruby
20+
# Good:
21+
post_height = 7.0
22+
user_name = gets.chomp
23+
24+
class Item
25+
def initialize(item_name)
26+
@item_name = item_name
27+
end
28+
end
29+
30+
# Bad:
31+
p = 7
32+
ph = '7.0'
33+
postHeight = 77
34+
35+
class Item
36+
@item_name = # Incorrect usage outside of a method in class scope
37+
end
38+
39+
```
40+
41+
#### Conditionals & Operators
42+
```ruby
43+
x = 2
44+
45+
# Good:
46+
if x < 2
47+
result = "x is less than 2"
48+
elsif x > 2
49+
result = "x is greater than 2"
50+
else
51+
result = "x is exactly 2"
52+
end
53+
54+
puts result
55+
56+
# Bad:
57+
if x < 2
58+
result = "x is less than 2"
59+
elsif x > 2
60+
result = "x is greater than 2"
61+
end
62+
63+
puts result
64+
65+
```
66+
67+
#### Data Types
68+
```ruby
69+
# Good:
70+
name = "Bobbina"
71+
honorific = "Ms. #{name}"
72+
73+
# Bad:
74+
num = '2'
75+
total = 1 + num.to_i
76+
```
77+
78+
### CODE QUALITY
79+
80+
| Rating | Skill | Description
81+
|--------|----------------|-----------------------------------------------------------
82+
| | Correctness | Code runs without errors or bugs. Edge cases are tested for and handled appropriately.
83+
| | Readability | Formatting is consistent. Naming conventions are followed. Use of white space and tabs are consistent. Code is concise. Each group of statements creates a complete thought and those thoughts are separated by blank lines. Variable, method and class names are meaningful.
84+
| | Structure | Methods perform one, and only one, function. Blocks of code that are run multiple times are not cut-and-pasted, but instead are written as loops and functions. Variables are not duplicated unnecessarily.
85+
| | Efficiency | There is no unused code included.
86+
| | Comments | Comments accurately describe code logic and are placed before or on the line they describe. Comments are either: information that can’t be expressed in code, intent comments, or summary comments.
87+
88+
###OVERALL RATING
89+
90+
91+
92+
###COMMENTS

0 commit comments

Comments
 (0)