It also has their written ideas of how the capitalist society of their time would be replaced by socialism , and after that , communism . It also briefly features their ideas for how the capitalist society of the time would eventually be replaced by socialism , and then eventually communism .