How would a navy repair a damaged warship if it had science-fiction technology?
Short answerWith industrial-scale replication, damaged structural sections could be cut out and replaced by newly fabricated modules, although the method depends on the setting's technology.
NotesThe repair method depends on which fictional technology is available. With the full range of Star Trek technology, building a replacement ship is an option. A more limited repair would cut out the damaged section and insert a new one made by an industrial-scale replicator. This proposal uses fabrication capacity to replace whole sections of a damaged hull.