Write a complete C++ program that prompts the user for the price of the prix fixe menu choice. The program should then prompt the user for the number of guests in the party. The program should then calculate the bill including tax and tip then print the results to the console in the form of a receipt
For C++ Programming (I need it for C++ without using importing from java.)
In: Computer Science
This is Java programing. Complete Java program to produce the following output.
interface Register{
void course();
}
public class Interface1{
public static void main(String
args[]){
Register c=new A();
c.course();
Register s=new B();
s.course();
}
}
//output
I'm taking A
I'm taking B
In: Computer Science
In C++ Please
Problem 1: How to calculate a home's value
Housing economists have long used a home price/rent ratio as one
way to gauge whether or not home prices are inflated or
undervalued.
A housing P/E
The use of a price/rent ratio is analogous to employing a
price/earnings ratio for stocks. When a stock price is high, and
its earnings per share relatively low, the P/E is high. A high P/E
often indicates that the stock is too expensive, and the share
price is headed for a drop.
What someone is willing to pay to rent a place is that home's
"earnings." And, just as in the stock market, a high home price
related to the rental earnings mean homes values will probably
drop.
For a specific look at how a home's P/E is determined, let's
consider a home that is listed for either rent or sale in suburban
Chicago.
The home has been rented for the past three years for $1,600 per
month; so that is $19,200 per year. It is currently listed for sale
at $400,000. Dividing the price by the total annual rent of $19,200
gives a "housing P/E" of 20.83. According to Moody's Economy.com,
the long-run average housing P/E is 16, so a P/E of 20.83 suggests
that this home may be somewhat overpriced.
For this programming project you will read in a list of housing
prices and how much each house is rented for that are found in the
attached HousingPrices.txt file. The file looks like this:
713047 1246
1605787 1979
1174719 1879
1018239 1700
Where the first value on each line is the price of the home, and
the second number on each line is the price that this home
currently rents for per month.
Read these numbers in from the file into 2 separate arrays of size
100, since there are 100 home prices/rents in the file. Do this
part in your main method.
Then use a for-loop to loop through the arrays and for each pair of
values send them into a method that you will write called
"getHousingPE". Your method will have two parameters; the price of
the home and the current monthly rental rate of the home. Your
method will calculate and then return the homes “housing P/E”.
Check each homes returned P/E value and if the P/E value is greater
than 16 you should write to the output “House # is somewhat
overpriced”; where # is the number of the house in the file (1100).
If the P/E is greater than 19 then you should write to the output
“House # is way overpriced”. If the P/E is less than 12 then you
should write to the output "“House # might be a good deal”. And if
the P/E is less than 9 then you should write “Buy House #, it is a
deal”. If the P/E is between 12-16 then output "House # is
average".
Problem 2:
Determining Left or
Right
For this programming
project you are to
read in a list
of street addresses
and determine how
many of those
addresses are on
the right side of
the street, and how
many are on the
left. The street
addresses file is a
text file that
looks like:
6 S 33rd St
6 Greenleaf Ave
618 W Yakima Ave
74 S Westgate St
3273 State St
You can determine
if an address is
either on the left
or right side of
the street by
looking at the
number of the
address; all even
numbers are on the
right side of the
street, and all odd
numbers are on the
left side of the
street.
You will read your
data into 2 arrays;
an integer array to
hold the street
number, and a
String array to
hold the rest of
the address.
These will be
parallel arrays, meaning
the street number
and street address
of each index are
related to each
other.
Remember to draw a
picture so that you
can visualize this.
You will need to
write a method that
will determine if
each house is on
the left or right
side of the
street.
You will call this
method for every
street address, and
then keep a count
of how many houses
are on the left
and right sides of
the street.
The output should
be the street
number and address
and then whether
the house is on
the left or right
side of the
street:
Address Left/Right
6649 N Blue Gum St left
4 B Blue Ridge Blvd right
8 W Cerritos Ave #54 right
639 Main St left
…
The number of houses on the left and right sides of the street should also be output.
In: Computer Science
How many + operations occur when the following pseudocode is executed? What is the output? s ← 0, t ← 0 for i ∈ {1, ..., 6} do for j ∈ {1, ..., 6} do for k ∈ {1, ..., 6} do if i + j + k = 9 then t ← t + 1 s ← s + 1 print t / s
In: Computer Science
Write a C Unix shell script called showperm that accepts two command line parameters. The first parameter should be an option flag, either r, w or x. The second parameter should be a file name. The script should indicate if the specified file access mode is turned on for the specified file, but it should display an error message if the file is not found. For example, if the user enters: showperm r thisfile the script should display “readable” or “not readable” depending on the current status of thisfile.
In: Computer Science
You are assigned to implement the following baggage-check-in system at the airport.
The system keeps track of data for the following information: passenger, bags, and tickets.
The program must maintain passenger details like name, address, phone number, and the number of bags. Each passenger can have multiple bags and each bag has length, width, height, and weight. The passenger also has a ticket. The tickets are of two types, either a first-class ticket or an economy-ticket. The maximum weight allowed for a first-class ticket is 40 Kilos and the maximum weight allowed for an economy-ticket is 30 Kilos. The program must display all the details of the passenger, ticket, and number of bags and allowed weight. If the weight exceeds that of the respective ticket class, then the program will give appropriate message to indicate that the passenger cannot travel. Your program must throw an exception to indicate the failure.
Requirements
In: Computer Science
Use C++
Black Jack
Create a program that uses methods and allows the user to play the game of blackjack against the computer dealer. Rules of Blackjack to remember include:
1. You need one 52 card deck of cards with cards from 2-Ace (4 cards of each number).
2. Jacks, Queens and Kings count as 10 points.
3. An Ace can be used as either 1 or 11 depending on what the user decides during the hand.
4. Draw randomly two cards for the "dealer" and display one of them while keeping the other hidden. Also, randomly draw two cards for the player and display them in view.
5. Allow the user to hit (randomly draw a card) as many times as they wish. If the player "busts" or gets over 21, the dealer automatically wins the players wager.
6. After the user "stands" or is satisfied with his total, the dealer must take a card if his total is 16 or below, and cannot take a card if his total is 17 or above.
7. If the dealer "busts" or goes over 21, the player wins back his wager plus his wager again. (Example - if a player bets $3 he gets back his original $3 plus an additional $3).
8. If neither the dealer or the player "busts" or goes over 21, then the highest total wins. Ties go to the dealer.
9. Note - the player should start with $20 in the bank and cannot wager more than he currently has in the bank.
10. Note - before each round the user can bet in whole dollars how much to wager or how much of the total in the bank to risk.
11. Allow the user to quit at any time. Of course, the user must quit if he/she runs out of money.
12. Remember, somehow ensure that the same card (example - 6 of spades) cannot be drawn twice in a single hand.
In: Computer Science
A parent may terminate the execution of one of its children. What are the reasons?
In: Computer Science
topic:- Fundamentals of Databases
*********** no hand writing*********
If there is photo but photo don’t do fax ?
*the answer must be unique not copied "plagiarized "
question One
Consider the following two tables:
Table – EmployeeInformations
EmpId Name ManagerId DateOfJoining
121 Ali 321 01/31/2014
321 Raed 986 01/30/2015
421 Khaled 876 27/11/2016
Table – EmployeeSalary
EmpId Project Salary
121 P1 8000
321 P2 1000
421 P1 12000
Question
Explain the role of SQL authorization mechanisms that allow to differentiate among the users of the database as far as the type of access they are permitted on various data values in the database?
In: Computer Science
2b.With an internet shopping world example,explain the online shopping ai agent with html form code.(50marks)
Need own answer and no internet answers r else i il downvote nd report to chegg.Even a single is wrong i il downvote.its 50marks question so no short answer minimum 10page answer required and own answer r else i il downvote.
Note:Minimum 10page answer and no plagarism r else i il downvote and report to chegg.Minimum 10 to 15page answer required r else dnt attempt.strictly no internet answer n no plagarism.
its 50marks question so i il stricly review nd report
need own answer for 50marks.
In: Computer Science
FASTQ to FASTA converter: Implement a FASTQ to FASTA file format converter in python (the input is a FASTQ file and the output is a FASTA file)
In: Computer Science
Write a Python program that prints 20 “random” license plate numbers, each one consisting of three randomly-chosen digits followed by three randomly chosen upper-case letters. The first digit cannot be zero. Sample output might look like: 382 HGK 819 YEU
In: Computer Science
APPLICATIONS (GOOGLE CHROME, MICROSOFT EDGE BROWSER AND THUNDERBIRD MAIL APPLICATION) How does each of them address patch management? Visit their Web sites to determine facilities they have to alert users to new vulnerabilities. Then look at three competing products (for example, if you are examining Microsoft Office, then look at OpenOffice) and evaluate their patch management system. What did you discover? Are the patch management systems adequate? During your research, be sure to answer the following questions
In: Computer Science
Create a program in Visual studio c++ Frank wants to take his wife, son, and daughter on a vacation this next summer. Create a program named "Your last name_Vacation" This program will prompt Frank to choose a number between 1 and 6. Use a switch…case to determine which number he chose. Use a Do…while loop to return to the prompt if the number is <1 and >6. 1 - Hawaii – 7 days / 6 nights 2 - New York – 3 days / 2 nights 3 - London – 7 days / 6 nights 4 - Bahamas – 7 days / 6 nights 5 - Miami – 3 days / 2 nights 6 - Los Angeles – 3 days / 2 nights The default will be; Stay Home – 7 days / 6 nights Use a Do…while loop to return to the prompt if the number is <1 and >6. Create a message that tells Frank about his vacation he chose. Use a for loop to create a list when Frank enters his first name, last name, and age, then enters the same for his wife, son, and daughter. Ex. Frank Last Age Wife “ “ Son “ “ Daughter “ “ Frank will input the departure date of his vacation. The final output should be in the following format; Congratulations! You and your family are going to “location” Frank Last Age Wife “ “ Son “ “ Daughter “ “ Your departure date is “date”.
In: Computer Science
Convert into pseudo-code for below code
===============================================
class Main
{
public static void main(String args[])
{
Scanner s=new
Scanner(System.in);
ScoresSingleLL score=new
ScoresSingleLL();
while(true)
// take continuous inputs from user till he
enters -1
{
System.out.println("1--->Enter a number\n-1--->exit");
System.out.print("Enter your choice:");
int
choice=s.nextInt();
if(choice!=-1)
{
System.out.print("Enter the score:");
int number=s.nextInt();
System.out.print("Enter the name:");
String name=s.next();
GameEntry entry=new
GameEntry(name,number);
if(number!=-1)
{
if(score.getNumberOfEntries()==10)
// if linkedlist has more than 10 nodes, remove
min score and add new score
{
int
minValue=score.getMinimumValue(); // function to get
minValue
if(minValue<number)
// if min score is greater than given score,
then dont add new node
{
int
minValueIndex=score.getMinimumValueIndex(); // function
to get minValueIndex
score.remove(minValueIndex);
// remove minValueIndex
node
score.add(entry);
// add the new node
}
}
else
{
score.add(entry);
// if
linked list has less than 10 nodes, add the current node
}
}
score.printScore();
// method to print entries in linked lists
score.printHighestToLowest();
}
else
{
break;
}
}
}
}
class ScoresSingleLL
{
SingleLinkedList head=null;
int noOfEntries=0;
public void add(GameEntry e)
{
SingleLinkedList tempNode=new
SingleLinkedList(e);
if(head==null)
// if list is empty add new
node as head
{
head=tempNode;
}
else
{
SingleLinkedList
node=head;
while(node.next!=null) // else add
new node at tail
{
node=node.next;
}
node.next=tempNode;
}
noOfEntries++;
}
public GameEntry remove(int minValueIndex)
{
SingleLinkedList node=head;
if(minValueIndex==0)
// if value to be removed is head, remove
head
{
head=head.next;
}
else
{
SingleLinkedList
prevNode=head; // else remove index
'i' element
node=head.next;
int
index=1;
while(index!=minValueIndex)
{
index++;
prevNode=node;
node=node.next;
}
prevNode.next=node.next;
}
noOfEntries--;
return node.node;
}
public int getMinimumValueIndex()
{
SingleLinkedList
node=head;
int
minValue=Integer.MAX_VALUE;
int index=0,i=0;
while(node!=null)
{
if(node.node.score<minValue)
{
minValue=node.node.score;
index=i;
}
node=node.next;
i++;
}
return index;
}
public int getMinimumValue()
{
SingleLinkedList
node=head;
int
minValue=Integer.MAX_VALUE;
while(node!=null)
{
if(node.node.score<minValue)
{
minValue=node.node.score;
}
node=node.next;
}
return minValue;
}
public void printHighestToLowest()
{
int [] arr=new
int[noOfEntries];
int i=0;
for(SingleLinkedList
node=head;node!=null;node=node.next)
{
arr[i++]=node.node.getScore();
}
Arrays.sort(arr);
System.out.println(Arrays.toString(arr));
}
public int getNumberOfEntries()
{
return noOfEntries;
}
public void printScore()
{
SingleLinkedList
node=head;
while(node!=null)
{
System.out.println(node.node.name+" "+node.node.score);
node=node.next;
}
}
}
class SingleLinkedList
{
GameEntry node;
SingleLinkedList next;
SingleLinkedList(GameEntry node)
{
this.node=node;
}
}
===============================================
In: Computer Science