Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace PlanetLibrary
- {
- public class Planet : PlanetMaths
- {
- //Variables
- double Radius = 0;
- double Surface = 0;
- double Atmosphere = 0;
- double Speed = 0;
- double DistanceQ = 0;
- double Mass = 0;
- double Weight = 0;
- int YearInDays = 0;
- int Time = 0;
- double Circle = 0;
- string stringHolder = "";
- double ans = 0;
- public Planet()
- {
- }
- public void setRadius(double PlanetRadius)
- {
- Radius = PlanetRadius;
- }
- public double getRadius()
- {
- return Radius;
- }
- public void setSurface(double PlanetSurface)
- {
- Surface = PlanetSurface;
- }
- public double getSurface()
- {
- return Surface;
- }
- public void setAtmosphere(double PlanetAtmosphere)
- {
- Atmosphere = PlanetAtmosphere;
- }
- public double getAtmospehere()
- {
- return Atmosphere;
- }
- public void setSpeed(double PlanetSpeed)
- {
- Speed = PlanetSpeed;
- }
- public double getSpeed()
- {
- return Speed;
- }
- public void setDistance(double PlanetDistance)
- {
- DistanceQ = PlanetDistance;
- }
- public double getDistance()
- {
- return DistanceQ;
- }
- public void setMass(double Mass)
- {
- Weight = Mass;
- }
- public double getMass()
- {
- return Mass;
- }
- public void setYearInDays(int YearInDays)
- {
- Time = YearInDays;
- }
- public double getYearInDays()
- {
- return YearInDays;
- }
- }
- public class PlanetMaths : GeneralMaths
- {
- public PlanetMaths()
- {
- }
- public static string PlanetMass(string surfaceType, double radius)
- {
- string stringHolder;
- double answer;
- if(surfaceType == "Rock")
- {
- answer = * 2002.00;
- }
- else if (surfaceType == "Gas")
- {
- }
- else
- {
- }
- }
- }
- public class GeneralMaths
- {
- public GeneralMaths()
- {
- }
- public double Volume (double radius)
- {
- double answer;
- answer = (4 / 3) * (Math.PI) * (radius * radius * radius);
- return answer;
- }
- public double Distance(double radius)
- {
- double answer;
- answer = 2 * (Math.PI) * radius;
- return answer;
- }
- }
- // class Display
- // {
- //
- // Console.WriteLine("|-------------------------------|");
- // Console.WriteLine("| Planet Calculator |");
- // Console.WriteLine("|-------------------------------|");
- // Console.WriteLine("");
- // Console.WriteLine("|-------------------------------|");
- // }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement