How change this script to Blender 2.8, who is "use input() or raw_input() functions in blender scripting?"
Scene.objects.active is no longer valid
For 2.8 to get or set the active object use
context.view_layer.objects.active = ob

however after an operator call the object has context, so with minimal changes
    def execute(self, context):        
        add_cube(context, self.name, self.scale)
        self.report({'INFO'}, &quot;Added Cube&quot;)
        return {'FINISHED'}

    # This is called when the operator is called, this &quot;shows&quot; the dialog 
    def invoke(self, context, event):
        wm = context.window_manager
        return wm.invoke_props_dialog(self)

# This method adds a cube to the current scene and then applys scale and
# name to the cube  
def add_cube(context, name, scale):
    bpy.ops.mesh.primitive_cube_add() 
    cube = context.object
    cube.name = name
    cube.scale = scale