Answer:
                       Journal entry For Depreciation
Date        Account and explanation            Debit    Credit
July 1	Depreciation expense                 $7,500 
                 (105000/7)*6/12
                        Accumulated depreciation-Machine   $7,500
                  (To record Depreciation)
1)                     Journal entry
Date        Account and explanation                      Debit     Credit
July 1        Cash                                                     $45,500
                 Accumulated depreciation-Machine  $67,500  
                         Machine                                                         $105,000
                         Gain on Sale of Machine                              $8,000
                 (To record sale of Machine)  
2)                                 Journal entry
Date         Account and explanation                       Debit       Credit
July 1         Cash                                                      $25,000
                  Accumulated depreciation-Machine  $67,500
                   (105000/7*4.5)
                  Loss on sale of machine                      $12,500
                          Machine                                                            $105,000
                  (To record sale of Machine)