Computers and Technology Quiz & Practice Tests - Test Your Skills

You are asked to design a data model for The Wagging Tail, an online store that sells products for dogs, e.g. dog collars, dog food, dog toys, dog treats, etc. You want to keep track of three entities: (1) the products that the store sells, (2) customers who purchase the products, and (3) the orders that are made on the website.Draw an ERD diagram and use the following information to help guide your drawing:The database should keep track of all products that the store offers for saleThe database should keep track of all customers who have registered with the store websiteThe database should keep track of all orders placed on the websiteAt most only a single customer can be related to any single orderA customer can place multiple orders with the website Each entity must have a unique identifier within its table. This is the Entity's/table's Primary Key.An order must consist of at least one product, and may consist of multiple productsYou wish to keep track of the cost of the product to the store, and the price that the store sells a product to the customerYou wish to be able to contact customers via phone and emailYou wish to be able to determine when is the busiest time of year for your website according to number of orders placedYour drawing should include the following: 1. The entities you wish to model 2. The required/important attributes for each entity (refer to these instructions for guidance on what is required/important) 3. The relationships between the entities 4. The correct MAX and MIN Cardinalities for each relationship (remember for each relationship, or line, there are MAX/MIN cardinalities on each side of the relationship)
// The QuickCopy company currently makes 100,000 copies per year// at 15 cents each.// They expect to increase the number of copies produced// by 4 percent per year each year for the next 10 years,// starting with this year.// They also expect the price of each copy to increase// by 3 cents per year, starting with this year.// This program displays the company's expected// income for each of the next 10 years.// Modify it to be more efficient.startDeclarationsnum year = 1num copies = 100000num price = 0.15num total = 0num COPIES_INCREASE = 0.04num PRICE_INCREASE = 0.03copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalyear = year + 1copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalyear = year + 1copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalyear = year + 1copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalyear = year + 1copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalyear = year + 1copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalyear = year + 1copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalyear = year + 1copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalyear = year + 1copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalyear = year + 1copies = copies + copies * COPIES_INCREASEprice = price + price * PRICE_INCREASEtotal = total + copies * priceoutput year, totalstop
Complete the code for this PiggyBank class. I have also included a main program (TestPiggy) for you to use to test your class. When I grade your PiggyBank class, I will use this exact same main program so be sure your class compiles and runs with it. I have also attached a screenshot of what your output should look like. Note the way the numeric values are formatted; yours should be the same.public class PiggyBank implements Measurable, Comparable {private int numNickels, numPennies, numDimes, numQuarters;// to do; complete the constructorpublic PiggyBank() {}// to do; complete the constructorpublic PiggyBank(int quarters, int dimes, int nickels, int pennies){}// to do; it just returns 0; code it so that it returns the monetary// amount of the piggy bankpublic double getMeasure(){return 0.0;}// to do; it just returns 0; code it so that it correctly comparespublic int compareTo(Object other){return 0;}// to do; it just returns a blank string right nowpublic String toString(){return "";}}public class Data{public static double average(Measurable[] objects){double sum = 0;for (Measurable obj : objects){sum = sum + obj.getMeasure();}if (objects.length > 0){return sum / objects.length;}else {return 0;}}}import java.text.NumberFormat;import java.util.Arrays;public class TestPiggy { public static void main(String[] args) { PiggyBank [] banks = new PiggyBank[10]; banks[0] = new PiggyBank(5, 10, 19, 32); banks[1] = new PiggyBank(6, 0, 2, 1); banks[2] = new PiggyBank(0, 20, 15, 3); banks[3] = new PiggyBank(1, 3, 99, 591); banks[4] = new PiggyBank(0, 0, 10, 0); banks[5] = new PiggyBank(15, 3, 0, 25); banks[6] = new PiggyBank(); banks[7] = new PiggyBank(11, 3, 0, 1); banks[8] = new PiggyBank(0, 0, 1, 5); banks[9] = new PiggyBank(8, 10, 20, 100); NumberFormat formatter = NumberFormat.getCurrencyInstance(); String moneyString = formatter.format(Data.average(banks)); System.out.println ("The average of all the piggy banks is " + moneyString); Arrays.sort(banks); System.out.println ("The piggy banks in sorted order, smallest to largest, are:"); for (int i = 0; i < 10; i++) System.out.println (banks[i]); }}
Answer the following questions:Question 4 ............ in the data link layer separates a message from one source to a destination, or from other messages to other destinations, by adding a sender address and a destination address.Group of answer choicesTransformingFramingSeparatingMessagingQuestion 5 Functions of data link control includesGroup of answer choicesframingflow and error controladdressingAll of aboveQuestion 6 In which of the following modes of the CLI could you configure the duplex setting for interface Fast Ethernet 0/5?Group of answer choicesUser modeEnable modeGlobal configuration modeVLAN modeInterface configuration modeQuestion 7 It is how the receiver detects the start and end of a frame.Group of answer choicesError controlFlow controlFramingNone of the aboveQuestion 8 Which of the following describes a way to disable IEEE standard autonegotiation on a 0/00 port on a Cisco switch?Group of answer choicesConfigure the negotiate disable interface subcommandConfigure the no negotiate interface subcommandConfigure the speed 00 interface subcommandConfigure the duplex half interface subcommandConfigure the duplex full interface subcommandConfigure the speed 00 and duplex full interface subcommandsQuestion 9 ______ substitutes eight consecutive zeros with 000VB0VB.Group of answer choicesB4B8HDB3B8ZSnone of the aboveQuestion 0 In _________ transmission, we send bits one after another without start or stop bits or gaps. It is the responsibility of the receiver to group the bits.Group of answer choicessynchronousasynchronousisochronousnone of the aboveQuestion In _______ transmission, bits are transmitted over a single wire, one at a time.Group of answer choicesasynchronous serialsynchronous serialparallel(a) and (b)Question 2 Digital data refers to information that isGroup of answer choicesContinuousDiscreteBitsBytesQuestion 3 Two common scrambling techniques are ________.Group of answer choicesNRZ and RZAMI and NRZB8ZS and HDB3Manchester and differential ManchesterQuestion 4 ________ is the process of converting digital data to a digital signal.Group of answer choicesBlock codingLine codingScramblingNone of the aboveQuestion 5 A switch receives a frame with a destination MAC address that is currently not in the MAC table. What action does the switch perform?Group of answer choicesIt drops the frame. .It floods the frame out of all active ports, except the origination port. It sends out an ARP request looking for the MAC address. It returns the frame to the senderQuestion 6 The _______ layer changes bits into electromagnetic signals.Group of answer choicesPhysicalData linkTransportNone of the aboveQuestion 7 Serial transmission occurs inGroup of answer choicesway2 ways3 ways4 waysQuestion 8 What type of switch memory is used to store the configuration used by the switch when it is up and working?Group of answer choicesRAMROMFlashNVRAMQuestion 9 In what modes can you type the command show mac address-table and expect to get a response with MAC table entries? (Select Two)Group of answer choicesUser modeEnable mode Global configuration modeInterface configuration modeQuestion 20 Which of the following are true when comparing TCP/IP to the OSI Reference Model? (Select Two)Group of answer choicesThe TCP/IP model has seven layers while the OSI model has only four layers.The TCP/IP model has four or five layers while the OSI model has seven layers.The TCP/IP Application layer maps to the Application, Session, and Presentation layers of the OSI Reference Model.he TCP/IP Application layer is virtually identical to the OSI Application layer.