Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I Can't copy so i attached them Background Imagine that you are a communication ofcer during World War 2 (either with the Americans, Germans, Russians,

I Can't copy so i attached them

image text in transcribedimage text in transcribedimage text in transcribed
Background Imagine that you are a communication ofcer during World War 2 (either with the Americans, Germans, Russians, Japanese, .. your choice!). Your job is to receive updates from military intelligence (intel) on enemy status. You have to pass this info to commanders and receive their orders. Then you have to pass these orders to frontline soldiers. Somehow, Java existed at that time! Elaboration As a communication officer, at any moment you may receive an intel message with one of the following codes: NovemberTreeLiinaIOO EchoAlfaVictorSO AlfaMikeBravo-lO If you receive the code \"NovemberTreeLiina 100\" you will inform the commander by sending a message with the word \"No threat\" written on it. The commander will receive your message, read it and then make a decision and return a message with the word \"Standby\". You will print this message, read it and then pass it to the frontline soldiers. The frontline soldiers will read this message and if the orders are to \"Standby\" then they will (as an imitation of reality) print an artillery with no the shell (projectile) loaded. Something like: If you receive the code \"Echo-AlfaVictorSO\" you will inform the commander by sending a message with the word \"Enemy approaching\". The commander will receive your message, read it and return a message with the word \"Lock and load\". You will print this message, read it and pass it to the frontljne soldiers. The frontline soldiers will read your message and if the orders are to \"Lock and load\" then they will print an artillery with the shell (projectile) loaded in it. Something like: If you receive the code "Alfa-Mike-Bravo-10" you will inform the commander by sending a message with the word "Ambush". The commander reads your message and return a message with the word "Fire". You will print this message, read it and then pass it to the frontline soldiers. The frontline soldiers will read this message and if the orders are to "Fire" then they will print an artillery with the shell (projectile) has been launched. Something like: Code Meaning Commander's Order Frontline Action November-Tree-Lima-100 No threat Standby Artillery with no shell Echo-Alfa-Victor-50 Enemy approaching Lock and load Artillery with shell loaded Alfa-Mike-Bravo-10 Ambush Fire Artillery with shell launched Requirements: . Create a file that contains one of the code lines and save it as "intel.txt". . Read the contents of the file and, depending on code, pass it to a method called commanderOrders(). Get the commander's order from this method, print it using Printstream and then scan it. Depending on the order, pass it to a method called militaryEngagement(). . The militaryEngagement( ) method should not print artillery actions but rather call other methods you are going to create solely for printing the artillery pictures. Notes:- Add a paragraph at the beginning explaining what this code does. 0 Document your code, use appropriate variables\" names and follow Java programming etiquettes. - Use commanderOrdersO as the name of the method you use to send intel to commander and receive order. 0 Use mititaryEngagemen) as the name of the method you use to send commander's orders to frontljne soldiers. 0 Artillery pictures don't have to be exact

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions