define variables in sql
Create a class called invoice that a hardware store might use to represent an invoice for an item sold at the store. An invoice should include four pieces of information as instance variables, a part number(type string), a part description (type string), a quantity of the item being purchased (type int) and a price per item(double).Your class should have a constructor that initializes the four instance variables. Provide a set and a get method for each instance variable. In addition, provide a method named getInvoiceAmount that calculates the invoice amount (i.e., multiplies the quantity by the price per item), then returns the amount as a double value .If the quantity is not positive, it should be set to 0.If the price per item is not positive ,it should be set to 0.0.
Write a test app named InvoiceTest that demonstrate class Invoice’s capabilities.
Create a class called Employee that includes three instance variables, a first name (type string), a last name (type string) and a monthly salary (double). Provide a constructor that initializes the three instance variable .Provide a set and a get method for each instance variable. If The monthly salary is not positive, do not set its value.
Write a test app named EmployeeTest that demonstrate class Employee’s capabilities. Create two Employee objects and display each object’s yearly salary. Then give each Employee a 10% raise and display each display each employee’s yearly salary again.
Write a program to find the count of unique digits in a given number N. The number will be passed to the program as the input of type int.
Assumption: The input number will be a positive integer number>=1 and <= 25000.
For e.g.
If the given number is 292, the program should print 2 because there are only 2 unique digits "2" and "9" int this number.
Write a Java Program to print
the characterization given the Ritcher scale number
Write a program in C++ which asks user for temperature as well as scale and displays converted temperature.
Develop a C++ program to get the CGPA and print the following status according to the given CGPA by using else if ladder statement. [Note: Use call by value]
1. CGPA < 50 "FAIL"
2. 50 >= CGPA <=60 "FIRST"
3. 60 > CGPA <=70 "SECOND"
4. 70 > CGPA <=80 "THIRD"
5. CGPA >80 "DISTINCTION"
Write overloaded function named "sort” that takes array of integers, float numbers and
characters. Get the user input and display it in the sorted order.
Develop a C++ program to get the CGPA and print the following status according to the given CGPA by using else if ladder statement. [Note: Use call by value]
1. CGPA < 50 "FAIL"
2. 50 >= CGPA <=60 "FIRST"
3. 60 > CGPA <=70 "SECOND"
4. 70 > CGPA <=80 "THIRD"
5. CGPA >80 "DISTINCTION"
String Starts or Ends with given String
Given an array
stringsArray of strings, and startString, endString as inputs, write a JS program to filter the strings in stringsArray starting with startString or ending with endString.
Quick Tip
You can use the array method filter() and logical operator OR ( || ).
function main() {
const stringsArray = JSON.parse(readLine().replace(/'/g, '"'));
const startString = readLine();
const endString = readLine();
/* Write your code here */
}