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]); }}
Fire Tint, Inc., (FTI), applies tint to airplane canopies (front windows) manufactured by other companies. When the canopy manufacturer asks FTI to tint a canopy, FTI tracks the manufacturer, model number, and the CIN, a unique serial number assigned to each individual canopy by the manufacturer. FTI has a finite set of standard treatments it applies to canopies. Each treatment applied by FTI has a treatment number, treatment description, and a published price for each treatment. Although there is a published price for each treatment type, FTI often negotiates the actual price for each treatment when a manufacturer places an order.Sometimes more than one different treatment is applied to the same canopy. When a treatment is applied to a canopy, FTI keeps track of the treatment applied, the date it was applied, and the start and end time of when the treatment was applied, and the negotiated actual price. Please choose the ERD that most appropriately represents the scenario above.(A) because it is serializable(B) because it is serializable(C) because it is virtual (non-seralized)(D) because it is virtual (non-serialized)
The 4Ps model has been challenged because it omits or underemphasizes important activities such as services. It's also been criticized for taking a seller's, rather than a buyer's, viewpoint. The more recent 4As framework complements the traditional model and includes ________. Group of answer choices adaptability, affordability, availability and awareness adaptability, affordability, accessibility and awareness acceptability, affordability, accessibility and aptitude acceptability, affordability, accessibility and awareness adaptability, affordability, availability and aptitude