Q.4.3 Consider the following pseudocode, then write the pseudocode for mainline logic that contains the elements required in Q.4.3.1 to Q.4.3.3. class Weapon Declarations string make string model...


Q.4.3 Consider the following pseudocode, then write the pseudocode for mainline
logic that contains the elements required in Q.4.3.1 to Q.4.3.3.


     class Weapon


                        Declarations


                               string make


                               string model


                               string serialNumber


                               string countryOfOrigin


                         void setMake (string manufacturer)


                              set make = manufacturer


                         return


                         string getMake()


                         return make


                    endClass




Q.4.3.1 Declare each of the instance variables and include an object for the class in the mainline logic.


Q.4.3.2 Assign the value “Glock” to the instance variable make.
Q.4.3.3 Use the appropriate method to display the contents of the instance variable make on the screen.


Q.4.4 Create an object diagram for the object created in Q.4.3.1. Your diagram
only has to include the details for the make instance variable.



Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here