The double Quote and single quote in 1 line
Construct a simple purchasing program based on the Requirement Below.
Main.java should only contain the main method and a Reference of Purchase Object. Purchase.java should contain this fields & Methods:
Fields/Instance Variables
-itemName : String
-itemPrice : double
-itemQuantity : int
-amountDue :double
Methods
setItemName(String itemName) : void
setTotalCost(int quantity, double price) : void
getItemName(): String
getTotalCost(): double
readInput():void
writeOutput(): void
•
Note: The readinput() method will be used to accept user input through the Scanner class.
Create a class named Exponent. Its main() method accepts an integer value from a user at the keyboard, and in turn passes the value to a method that squares the number (multiplies it by itself) and to a method that cubes the number (multiplies it by itself twice). The main() method displays the results. Create the two methods that respectively square and cube an integer that is passed to them, returning the calculated value. Save the application as Exponent.java
. Write an application that displays all even numbers from 2 to 100 inclusive, and that starts a new line after every multiple of 20 (20, 40, 60, and 80). Save the file as EvenNums.java.
Write a console application that uses at least five (5) different methods of Math class. Provide a meaningful identifier of the variables or constants. Name the namespace as MathApp and its class as MathProgram.
1.1 A Retail has name, a List containing Items available in the stock and another List containing sold items. [2] 1.2 A Retail have functionality to view available stock, that prints Class name of item, name of Item, size of item and total number of items that have same name, and size. [5] EXAMPLE
ClassName Item name Size Drink coke 1 Drink coke 2
Total
10; // this show that in the list there are 10 coke that are size of 1
5; // this show that in the list there are 5 coke that are size 2 Sizes in drinks means litres.
Hint: Items are the same if their class name, item name and size are the same.
1.3. A retail Shop has a functionality to add item into the stock list. The add item takes a parameter the Item to be added on stock. [2] 1.4 A retail shop also has a functionality to calculate total sales that returns double sum of money made from all sold items. [2]
Create a C++ program that allows the user to enter a maximum number from 20-40. From the number entered by the user, print the even numbers using for loop and do while loop for the odd numbers.
Create a C++ program using for loops and do while loop that give this output:
Enter the maximum number are: 21
Even numbers are :2 4 6 8 10 12 14 16 18 20
Odd numbers are :1 3 5 7 9 11 13 15 17 19 21
Explain the start-up process of a computer clearly indicating the purpose of the POST, BIOS, and CMOS
With aid of a diagram, give a brief explanation on the type of busses available on modern computer system and the purpose of the North bridge and south bridge