Question

In: Computer Science

Project Part 4: Part Four: Complete the addCruise() Method 1. In the Driver.java file, see below...

Project Part 4:

Part Four: Complete the addCruise() Method

1. In the Driver.java file, see below for where you will add code to finish the addCruise() method.

// Adda New Cruise public static void addCruise() {

// complete this method

}

2. Next, review the required functionality of the “Add Cruise” menu option below.



Menu Option Validation Check(s) Functionality
Add Cruise - Ensures cruise does not already exist in our system - Ensures all class variables are populated
Adds cruise to system

3. Add Cruise Method: Write the code for the addCruise() method. When your code is complete, test the output. Be sure that the completed method does the following:

a. Prompts the user for input b. Requires all class variables when creating a cruise c. Validates the ship name and ensures it is in service d. Ensures ship name is not already assigned a cruise e. Adds the new cruise to the cruiseList ArrayList if validation checks

Given cruise code:

public class Cruise {

// Class Variables
private String cruiseName;
private String cruiseShipName;
private String departurePort;
private String destination;
private String returnPort;

// Constructor - default
Cruise() {
}

// Constructor - full
Cruise(String tCruiseName, String tShipName, String tDeparture, String tDestination, String tReturn) {
cruiseName = tCruiseName;
cruiseShipName = tShipName;
departurePort = tDeparture;
destination = tDestination;
returnPort = tReturn;
}

// Accessors
public String getCruiseName() {
return cruiseName;
}

public String getCruiseShipName() {
return cruiseShipName;
}

public String getDeparturePort() {
return departurePort;
}

public String getDestination() {
return destination;
}

public String getReturnPort() {
return returnPort;
}

// Mutators
public void setCruiseName(String tVar) {
cruiseName = tVar;
}

public void setCruiseShipName(String tVar) {
cruiseShipName = tVar;
}

public void setDeparturePort(String tVar) {
departurePort = tVar;
}

public void setDestination(String tVar) {
destination = tVar;
}

public void setReturnPort(String tVar) {
returnPort = tVar;
}

// print cruise details
public void printCruiseDetails() {

// complete this method

}

Here is the driver code that needs completion:

import java.util.ArrayList;
import java.util.Scanner;

import static java.lang.Integer.parseInt;

public class Driver {

// class variables (add more as needed)
private static ArrayList<Ship> shipList = new ArrayList();
private static ArrayList<Cruise> cruiseList = new ArrayList();
private static ArrayList<Passenger> passengerList = new ArrayList();


public static void main(String[] args) {

initializeShipList(); // initial ships
initializeCruiseList(); // initial cruises
initializePassengerList(); // initial passengers

// add loop and code here that accepts and validates user input
// and takes the appropriate action. include appropriate
// user feedback and redisplay the menu as needed


}

// hardcoded ship data for testing
// Initialize ship list
public static void initializeShipList() {
add("Candy Cane", 20, 40, 10, 60, true);
add("Peppermint Stick", 10, 20, 5, 40, true);
add("Bon Bon", 12, 18, 2, 24, false);
add("Candy Corn", 12, 18, 2, 24, false);
}

// hardcoded cruise data for testing
// Initialize cruise list
public static void initializeCruiseList() {
Cruise newCruise = new Cruise("Southern Swirl", "Candy Cane", "Miami", "Cuba", "Miami");
cruiseList.add(newCruise);
}

// hardcoded cruise data for testing
// Initialize passenger list
public static void initializePassengerList() {
Passenger newPassenger1 = new Passenger("Neo Anderson", "Southern Swirl", "STE");
passengerList.add(newPassenger1);

Passenger newPassenger2 = new Passenger("Trinity", "Southern Swirl", "STE");
passengerList.add(newPassenger2);

Passenger newPassenger3 = new Passenger("Morpheus", "Southern Swirl", "BAL");
passengerList.add(newPassenger3);
}

// custom method to add ships to the shipList ArrayList
public static void add(String tName, int tBalcony, int tOceanView,
int tSuite, int tInterior, boolean tInService) {
Ship newShip = new Ship(tName, tBalcony, tOceanView, tSuite, tInterior, tInService);
shipList.add(newShip);
}


public static void printShipList(String listType) {
// printShipList() method prints list of ships from the
// shipList ArrayList. There are three different outputs
// based on the listType String parameter:
// name - prints a list of ship names only
// active - prints a list of ship names that are "in service"
// full - prints tabbed data on all ships

if (shipList.size() < 1) {
System.out.println("\nThere are no ships to print.");
return;
}
if (listType == "name") {
System.out.println("\n\nSHIP LIST - Name");
for (int i = 0; i < shipList.size(); i++) {
System.out.println(shipList.get(i));
}
} else if (listType == "active") {
System.out.println("\n\nSHIP LIST - Active");

System.out.println("-----------------------------------------------");
System.out.println(" Number of Rooms In");
System.out.print("SHIP NAME Bal OV Ste Int Service");
System.out.println("\n-----------------------------------------------");
for (Ship eachShip: shipList) {
if(eachShip.getType()==true)
eachShip.printShipData();
}


} else if (listType == "full") {
System.out.println("\n\nSHIP LIST - Full");
System.out.println("-----------------------------------------------");
System.out.println(" Number of Rooms In");
System.out.print("SHIP NAME Bal OV Ste Int Service");
System.out.println("\n-----------------------------------------------");
for (Ship eachShip: shipList)
eachShip.printShipData();

} else
System.out.println("\n\nError: List type not defined.");
}

public static void printCruiseList(String listType) {
if (cruiseList.size() < 1) {
System.out.println("\nThere are no cruises to print.");
return;
}
if (listType == "list") {
System.out.println("\n\nCRUISE LIST");
for (int i=0; i < cruiseList.size(); i++) {
System.out.println(cruiseList.get(i));
}
} else if (listType == "details") {
System.out.println("\n\nCRUISE LIST - Details");
System.out.println("------------------------------------------------------------------------------------------");
System.out.println(" |----------------------PORTS-----------------------|");
System.out.print("CRUISE NAME SHIP NAME DEPARTURE DESTINATION RETURN");
System.out.println("\n-----------------------------------------------------------------------------------------");
for (Cruise eachCruise: cruiseList)
eachCruise.printCruiseDetails();
} else
System.out.println("\n\nError: List type not defined.");
}

public static void printPassengerList() {
if (passengerList.size() < 1) {
System.out.println("\nThere are no passengers to print.");
return;
}
System.out.println("\n\nPASSENGER LIST");
System.out.println("-----------------------------------------------------");
System.out.print("PASSENGER NAME CRUISE ROOM TYPE");
System.out.println("\n-----------------------------------------------------");
for (Passenger eachPassenger: passengerList)
eachPassenger.printPassenger();
}

// display text-based menu
public static void displayMenu() {

System.out.println("\n\n");
System.out.println("\t\t\tLuxury Ocean Cruise Outings");
System.out.println("\t\t\t\t\tSystem Menu\n");
System.out.println("[1] Add Ship [A] Print Ship Names");
System.out.println("[2] Edit Ship [B] Print Ship In Service List");
System.out.println("[3] Add Cruise [C] Print Ship Full List");
System.out.println("[4] Edit Cruise [D] Print Cruise List");
System.out.println("[5] Add Passenger [E] Print Cruise Details");
System.out.println("[6] Edit Passenger [F] Print Passenger List");
System.out.println("[x] Exit System");
System.out.println("\nEnter a menu selection: ");
}

// Add a New Ship
public static void addShip() {

// complete this method

}

// Edit an existing ship
public static void editShip() {

// This method does not need to be completed
System.out.println("The \"Edit Ship\" feature is not yet implemented.");

}

// Add a New Cruise
public static void addCruise() {

// complete this method

  
}

// Edit an existing cruise
public static void editCruise() {

// method added to print ship's name vice memory address
@Override
public String toString() {
return cruiseName;
}
}

Solutions

Expert Solution

/**************************************Driver.java***********************/

import java.util.ArrayList;
import java.util.Scanner;

public class Driver {

// class variables (add more as needed)
   private static ArrayList<Ship> shipList;
   private static ArrayList<Cruise> cruiseList;
   private static ArrayList<Passenger> passengerList;

   public static void main(String[] args) {

       shipList = new ArrayList<>();
       cruiseList = new ArrayList<>();
       passengerList = new ArrayList<>();
       initializeShipList(); // initial ships
       initializeCruiseList(); // initial cruises
       initializePassengerList(); // initial passengers
       Scanner scanner = new Scanner(System.in);
       // add loop and code here that accepts and validates user input
       // and takes the appropriate action. include appropriate
       // user feedback and redisplay the menu as needed
       char option = ' ';
       do {
           displayMenu();
           System.out.print("Select your choice: ");
           option = scanner.nextLine().charAt(0);
           switch (option) {
           case '1':
               addShip();
               break;
           case '2':
               editShip();
               break;
           case '3':
               addCruise();
               break;
           case '4':
               editCruise();
               break;
           case '5':
               addPassenger();
               break;
           case '6':
               editPassenger();
               break;
           case 'A':

               printShipList("name");
               break;
           case 'B':
               printShipList("active");
               break;
           case 'C':
               printShipList("full");
               break;
           case 'D':
               printCruiseList("list");
               break;
           case 'E':
               printCruiseList("details");
               break;
           case 'F':
               printPassengerList();
               break;
           case 'x':
               System.out.println("Thank you, Bye!");
               break;

           default:
               System.out.println("Invalid choice: ");
               break;
           }

       } while (option != 'x');
   }

   // hardcoded ship data for testing
   // Initialize ship list
   public static void initializeShipList() {
       add("Candy Cane", 20, 40, 10, 60, true);
       add("Peppermint Stick", 10, 20, 5, 40, true);
       add("Bon Bon", 12, 18, 2, 24, false);
       add("Candy Corn", 12, 18, 2, 24, false);
   }

   // hardcoded cruise data for testing
   // Initialize cruise list
   public static void initializeCruiseList() {
       Cruise newCruise = new Cruise("Southern Swirl", "Candy Cane", "Miami", "Cuba", "Miami");
       cruiseList.add(newCruise);
   }

   // hardcoded cruise data for testing
   // Initialize passenger list
   public static void initializePassengerList() {
       Passenger newPassenger1 = new Passenger("Neo Anderson", "Southern Swirl", "STE");
       passengerList.add(newPassenger1);

       Passenger newPassenger2 = new Passenger("Trinity", "Southern Swirl", "STE");
       passengerList.add(newPassenger2);

       Passenger newPassenger3 = new Passenger("Morpheus", "Southern Swirl", "BAL");
       passengerList.add(newPassenger3);
   }

   // custom method to add ships to the shipList ArrayList
   public static void add(String tName, int tBalcony, int tOceanView, int tSuite, int tInterior, boolean tInService) {
       Ship newShip = new Ship(tName, tBalcony, tOceanView, tSuite, tInterior, tInService);
       shipList.add(newShip);
   }

   public static void printShipList(String listType) {
       // printShipList() method prints list of ships from the
       // shipList ArrayList. There are three different outputs
       // based on the listType String parameter:
       // name - prints a list of ship names only
       // active - prints a list of ship names that are "in service"
       // full - prints tabbed data on all ships

       if (shipList.size() < 1) {
           System.out.println("\nThere are no ships to print.");
           return;
       }
       if (listType.equalsIgnoreCase("name")) {
           System.out.println("\n\nSHIP LIST - Name");
           for (int i = 0; i < shipList.size(); i++) {
               System.out.println(shipList.get(i));
           }
       } else if (listType.equalsIgnoreCase("active")) {
           System.out.println("\n\nSHIP LIST - Active");

           System.out.println("-----------------------------------------------");
           System.out.println(" Number of Rooms In");
           System.out.print("SHIP NAME Bal OV Ste Int Service");
           System.out.println("\n-----------------------------------------------");
           for (Ship eachShip : shipList) {
               if (eachShip.getType() == true)
                   eachShip.printShipData();
           }

       } else if (listType.equalsIgnoreCase("full")) {
           System.out.println("\n\nSHIP LIST - Full");
           System.out.println("-----------------------------------------------");
           System.out.println(" Number of Rooms In");
           System.out.print("SHIP NAME Bal OV Ste Int Service");
           System.out.println("\n-----------------------------------------------");
           for (Ship eachShip : shipList)
               eachShip.printShipData();

       } else
           System.out.println("\n\nError: List type not defined.");
   }

   public static void printCruiseList(String listType) {
       if (cruiseList.size() < 1) {
           System.out.println("\nThere are no cruises to print.");
           return;
       }
       if (listType.equalsIgnoreCase("list")) {
           System.out.println("\n\nCRUISE LIST");
           for (int i = 0; i < cruiseList.size(); i++) {
               System.out.println(cruiseList.get(i));
           }
       } else if (listType.equalsIgnoreCase("details")) {
           System.out.println("\n\nCRUISE LIST - Details");
           System.out.println(
                   "------------------------------------------------------------------------------------------");
           System.out.println(" |----------------------PORTS-----------------------|");
           System.out.print("CRUISE NAME SHIP NAME DEPARTURE DESTINATION RETURN");
           System.out.println(
                   "\n-----------------------------------------------------------------------------------------");
           for (Cruise eachCruise : cruiseList)
               eachCruise.printCruiseDetails();
       } else
           System.out.println("\n\nError: List type not defined.");
   }

   public static void printPassengerList() {
       if (passengerList.size() < 1) {
           System.out.println("\nThere are no passengers to print.");
           return;
       }
       System.out.println("\n\nPASSENGER LIST");
       System.out.println("-----------------------------------------------------");
       System.out.print("PASSENGER NAME CRUISE ROOM TYPE");
       System.out.println("\n-----------------------------------------------------");
       for (Passenger eachPassenger : passengerList)
           eachPassenger.printPassenger();
   }

   // display text-based menu
   public static void displayMenu() {

       System.out.println("\n\n");
       System.out.println("\t\t\tLuxury Ocean Cruise Outings");
       System.out.println("\t\t\t\t\tSystem Menu\n");
       System.out.println("[1] Add Ship [A] Print Ship Names");
       System.out.println("[2] Edit Ship [B] Print Ship In Service List");
       System.out.println("[3] Add Cruise [C] Print Ship Full List");
       System.out.println("[4] Edit Cruise [D] Print Cruise List");
       System.out.println("[5] Add Passenger [E] Print Cruise Details");
       System.out.println("[6] Edit Passenger [F] Print Passenger List");
       System.out.println("[x] Exit System");
       System.out.println("\nEnter a menu selection: ");
   }

   // Add a New Passenger

   public static void addPassenger() {

       Scanner newPassengerInput = new Scanner(System.in);

       System.out.println("Enter the new passenger's name: ");

       String newPassengerName = newPassengerInput.nextLine();

       // ensure new passenger name does not already exist

       for (Passenger eachPassenger : passengerList) {

           if (eachPassenger.getPassengerName().equalsIgnoreCase(newPassengerName)) {

               System.out.println("That passenger is already in the system. Exiting to menu...");

               return; // quits addPassenger() method processing

           }

       }

       // get cruise name for passenger

       System.out.println("Enter cruise name: ");

       String newCruiseName = newPassengerInput.nextLine();

       // ensure cruise exists
       int flag = 0;
       for (Cruise eachCruise : cruiseList) {

           if (eachCruise.getCruiseName().equalsIgnoreCase(newCruiseName)) {

               flag = 1;

           }

       }
       if (flag == 0) {

           System.out.println("That cruise does not exist in the system. Exiting to menu...");

           return; // quits addPassenger() method processing

       }

       // get room type

       System.out.println("Enter Room Type (BAL, OV, STE, or INT: ");

       String room = newPassengerInput.nextLine();

       // validate room type

       if ((room.equalsIgnoreCase("BAL")) || (room.equalsIgnoreCase("OV")) ||

               (room.equalsIgnoreCase("STE")) || (room.equalsIgnoreCase("INT"))) {

           // validation passed - add passenger

           Passenger newPassenger = new Passenger(newPassengerName, newCruiseName, room.toUpperCase());

           passengerList.add(newPassenger);

       } else {

           System.out.println("Invalid input. Exiting to menu...");

           return; // quits addPassenger() method processing

       }

   }

   // Edit an existing passenger

   public static void editPassenger() {

       Scanner newPassengerInput = new Scanner(System.in);

       System.out.println("Enter the new passenger's name: ");

       String newPassengerName = newPassengerInput.nextLine();
       Passenger passenger = null;
       // ensure new passenger name does not already exist
       int flag = 0;
       for (Passenger eachPassenger : passengerList) {

           if (eachPassenger.getPassengerName().equalsIgnoreCase(newPassengerName)) {

               flag = 1;
               passenger = eachPassenger;
           }

       }

       if (flag == 1) {

           System.out.println("Enter cruise name: ");

           String newCruiseName = newPassengerInput.nextLine();

           // ensure cruise exists
           int flag1 = 0;
           for (Cruise eachCruise : cruiseList) {

               if (eachCruise.getCruiseName().equalsIgnoreCase(newCruiseName)) {

                   flag1 = 1;

               }

           }
           if (flag1 == 0) {

               System.out.println("That cruise does not exist in the system. Exiting to menu...");

               return; // quits addPassenger() method processing

           } else {

               // get room type

               System.out.println("Enter Room Type (BAL, OV, STE, or INT: ");

               String room = newPassengerInput.nextLine();

               // validate room type

               if ((room.equalsIgnoreCase("BAL")) || (room.equalsIgnoreCase("OV")) ||

                       (room.equalsIgnoreCase("STE")) || (room.equalsIgnoreCase("INT"))) {

                   // validation passed - add passenger

                   passenger.setPassengerCruise(newCruiseName);
                   passenger.setPassengerRoomType(room);

               } else {

                   System.out.println("Invalid input. Exiting to menu...");

                   return; // quits addPassenger() method processing

               }
           }
       }

   }

   // Method to check if input is a number

   public static boolean isANumber(String str) {

       for (int i = 0; i < str.length(); i++) {

           if (Character.isDigit(str.charAt(i)) == false)

               return false;

       }

       return true;

   }

   // Add a New Ship
   public static void addShip() {

       Scanner scan = new Scanner(System.in);

       System.out.print("Enter Ship Name: ");
       String shipName = scan.nextLine();
       int flag = 0;
       for (Ship ship : shipList) {

           if (ship.getShipName().equalsIgnoreCase(shipName)) {

               flag = 1;
           }
       }
       if (flag == 1) {

           System.out.println("That Ship is already in the system. Exiting to menu...");

           return;
       }

       System.out.print("Balcony: ");
       String balconyString = scan.nextLine();
       int balcony = 0;
       if (isANumber(balconyString))
           balcony = Integer.parseInt(balconyString);
       System.out.print("Ocean View:");
       String oceanViewString = scan.nextLine();
       int oceanView = 0;
       if (isANumber(oceanViewString))
           oceanView = Integer.parseInt(oceanViewString);
       System.out.print("Room Suite: ");
       String roomSuiteString = scan.nextLine();
       int roomSuite = 0;
       if (isANumber(roomSuiteString))
           roomSuite = Integer.parseInt(roomSuiteString);
       System.out.print("Room Interior: ");
       String roomInteriorString = scan.nextLine();
       int roomInterior = 0;
       if (isANumber(roomInteriorString))
           roomInterior = Integer.parseInt(roomInteriorString);
       System.out.print("In Service: ");
       boolean inService = scan.nextBoolean();
       scan.nextLine();

       shipList.add(new Ship(shipName, balcony, oceanView, roomSuite, roomInterior, inService));

   }

   // Edit an existing ship
   public static void editShip() {

       Scanner scan = new Scanner(System.in);
       System.out.print("Enter shipName: ");
       String shipName = scan.nextLine();
       Ship ship1 = null;
       int flag = 0;
       for (Ship ship : shipList) {

           if (ship.getShipName().equalsIgnoreCase(shipName)) {

               ship1 = ship;
               flag = 1;
           }
       }

       if (flag == 1) {
           System.out.print("Balcony: ");
           String balconyString = scan.nextLine();
           int balcony = 0;
           if (isANumber(balconyString))
               balcony = Integer.parseInt(balconyString);
           System.out.print("Ocean View:");
           String oceanViewString = scan.nextLine();
           int oceanView = 0;
           if (isANumber(oceanViewString))
               oceanView = Integer.parseInt(oceanViewString);
           System.out.print("Room Suite: ");
           String roomSuiteString = scan.nextLine();
           int roomSuite = 0;
           if (isANumber(roomSuiteString))
               roomSuite = Integer.parseInt(roomSuiteString);
           System.out.print("Room Interior: ");
           String roomInteriorString = scan.nextLine();
           int roomInterior = 0;
           if (isANumber(roomInteriorString))
               roomInterior = Integer.parseInt(roomInteriorString);
           System.out.print("In Service: ");
           boolean inService = scan.nextBoolean();
           scan.nextLine();

           ship1.setRoomBalcony(balcony);
           ship1.setRoomOceanView(oceanView);
           ship1.setRoomSuite(roomSuite);
           ship1.setRoomInterior(roomInterior);
           ship1.setInService(inService);
       } else {

           System.out.println("Ship is not in system...");
           return;

       }
   }

   public static void addCruise() {

       Scanner scan = new Scanner(System.in);

       System.out.print("Enter Cruise Name: ");
       String cruiseName = scan.nextLine();
       int flag = 0;
       for (Cruise cruise : cruiseList) {

           if (cruise.getCruiseName().equalsIgnoreCase(cruiseName)) {

               flag = 1;
           }
       }
       if (flag == 1) {

           System.out.println("That Cruise is already in the system. Exiting to menu...");

           return;
       }
       System.out.print("Enter Cruise Ship Name: ");
       String cruiseShip = scan.nextLine();
       System.out.print("Departure Port: ");
       String departurePort = scan.nextLine();
       System.out.print("Destination: ");
       String destination = scan.nextLine();
       System.out.print("Return Port: ");
       String returnPort = scan.nextLine();

       cruiseList.add(new Cruise(cruiseName, cruiseShip, departurePort, destination, returnPort));

   }

   // Edit an existing cruise
   public static void editCruise() {

       Scanner scan = new Scanner(System.in);

       System.out.print("Enter Cruise Name: ");
       String cruiseName = scan.nextLine();

       Cruise cruise1 = null;
       int flag = 0;
       for (Cruise cruise : cruiseList) {

           if (cruise.getCruiseName().equalsIgnoreCase(cruiseName)) {

               cruise1 = cruise;
               flag = 1;
           }
       }
       if (flag == 1) {
           System.out.print("Enter Cruise Ship Name: ");
           String cruiseShip = scan.nextLine();
           System.out.print("Departure Port: ");
           String departurePort = scan.nextLine();
           System.out.print("Destination: ");
           String destination = scan.nextLine();
           System.out.print("Return Port: ");
           String returnPort = scan.nextLine();

           cruise1.setCruiseShipName(cruiseShip);
           cruise1.setDeparturePort(departurePort);
           cruise1.setDestination(destination);
           cruise1.setReturnPort(returnPort);
       } else {

           System.out.println("Cruise not found!");
           return;
       }

   }

}

Please let me know if you have any doubt or modify the answer, Thanks:)


Related Solutions

Project part 3: Part Three: Complete the addShip() Method 1. In the Driver.java file, see below...
Project part 3: Part Three: Complete the addShip() Method 1. In the Driver.java file, see below for where you will add code to finish the addShip() method. // Add a New Ship public static void addShip() { // complete this method } 2. Next, review the required functionality of the “Add Ship” menu option below. Menu Option Validation Check(s) Functionality Add Ship - Ensures ship does not already exist in our system - Ensures all class variables are populated Adds...
Internet Programming Project #4:  XML, Schema and XSLT 1.   Write a complete XML file named textbooks.xml, in which...
Internet Programming Project #4:  XML, Schema and XSLT 1.   Write a complete XML file named textbooks.xml, in which you describe at least a partial list of the textbooks you are using this semester. You should include at least two distinct textbooks. If you are using only one text this semester, expand your list to cover the current academic year. Your description of each book must include the title, author(s), publisher, year of publication, and the ISBN. For each author, specify the first...
1.The file name Final.xlsx, sheet named Part 4 is kept blank. Use Part 4 sheet to...
1.The file name Final.xlsx, sheet named Part 4 is kept blank. Use Part 4 sheet to answer this question. Put a box around your answers. Round your answer to 4 decimal places. Information from the American Institute of Insurance indicates the mean amount of life insurance per household in the United States is $110,000 with a standard deviation of $40,000. Assume the population distribution is normal. A random sample of 100 households is taken. (a)What is the probability that sample...
Please see attached file and the link below and respond to following questions: 1. Is climate...
Please see attached file and the link below and respond to following questions: 1. Is climate change really a problem? 2. How much investment should firms really put into reducing emissions. 3. From a strategic standpoint, what are the practical implications of these changes/predicted changes? Sea transport has a relatively green image because ships emit less carbon dioxide per tonne and per kilometre than rail, truck or air transport. Yet, given its scale and rapid growth, it’s a major source...
Chapter 4 Assignments - Part #1 (Part #2 is on next page) Submit an HTML file...
Chapter 4 Assignments - Part #1 (Part #2 is on next page) Submit an HTML file attached to an email with your web page containing the elements below. - Create a web page with a comment containing your name after this line. o - In the head section, add character encoding. - Add the title "Chapter 4 Web Page #1 - by yourname" - Create a file called myStyles.css as the style sheet for the web page. - Add the...
Please complete it in C++ Part 1: Stack Create a New Project and give your project...
Please complete it in C++ Part 1: Stack Create a New Project and give your project a name, say Lab6a. Download the given source files StackArr.h and StackArr.cpp from Moodle and save them to your Lab6a folder. Also import them to your project. Add a source file to your project, called StackMain.cpp and implement your program according to the following: Prompt the user to input a program filename. Open the file and check if every right brace (i.e. }), bracket...
Instructions:  Save this file as YourName_PracticeDebuggingTest. - Part 1 – 4 Debugging Exercises – there are things...
Instructions:  Save this file as YourName_PracticeDebuggingTest. - Part 1 – 4 Debugging Exercises – there are things wrong – either logic or syntax errors.  Correct the pseudocode and one Java program. Add the corrected code in BOLD and change the corrected color to RED.   Part 1 Debugging 1:  Add the missing code in bold and red. start          Declarations                                     num firstNum                                     num secondNum                                     string MSG = “Got it!”                   housekeeping()                   detail()                   finish()          stop          housekeeping()                   output “Enter three numbers: ”                   input firstNum, thirdNum          return          detail()                   if...
Complete the table attached below to briefly identify four (4) characteristics of multidisciplinary teams and how...
Complete the table attached below to briefly identify four (4) characteristics of multidisciplinary teams and how they are used. Please identify the characteristics of a work team in the healthcare setting and how it would be applied. Briefly identify four (4) characteristics of multidisciplinary teams and how they are used? Multidisciplinary team characteristics How these characteristics are used to provide effective care 1. 2. 3. 4.
Part I– Check your file system Step 1: Execute the ls /dev/sd* command to see the...
Part I– Check your file system Step 1: Execute the ls /dev/sd* command to see the current hard disk devices. Step 2. Execute the fdisk -l command to list the current hard disk partitions Step 3. Execute the parted -l command to list the current hard disk partition table. Part II– Create a new virtual disk Step 1. In the Oracle VM VirtualBox Manager program, create a new virtual hard disk with the size of 200 MB, and name it...
Comprehensive Problem 4 Part 2: Note: You must complete part 1 before part 2. After all...
Comprehensive Problem 4 Part 2: Note: You must complete part 1 before part 2. After all of the transactions for the year ended December 31, Year 1, had been posted [including the transactions recorded in part (1) and all adjusting entries], the data that follows were taken from the records of Equinox Products Inc. Income statement data: Advertising expense $150,000 Cost of merchandise sold 3,700,000 Delivery expense 30,000 Depreciation expense—office buildings and equipment 30,000 Depreciation expense—store buildings and equipment 100,000...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT