Hello! I could really use help for these two problems.  Program 1 Show how well dressed you and your date are.  Your program will prompt for two inputs, the style of you and your date.  Input for each should be a integer on a scale of 1-10, with 10 being the best.  You can be seated immediately if either of you are 'stylin' (8 or higher) .  However, if you or your date have a style of 2 or less, then you won't be seated, even if one of you is a 8 or more. Otherwise, you'll have to wait for a table. Based on the inputs, the program should indicate if you can be seated right away, if you have to wait, or if there are no tables available. Sample output shown below: Rate how dressed up you are, with 10 being the highest ==> 8 How about your date?  Same scale  ==> 9 Your table is ready! Rate how dressed up you are, with 10 being the highest ==> 9 How about your date?  Same scale  ==> 2 Sorry, No table available Rate how dressed up you are, with 10 being the highest ==> 5 How about your date?  Same scale  ==> 5 Please wait for a table. My Code so far for program 1: import java.util.*; public class DateNight { public static void main(String args[]) {     Scanner Sc = new Scanner(System.in);        int input1; // Print a message asking for first persons level of dress.        System.out.print("Welcome to our restaurant! Please enter your level of dress, with 10 as the highest : "); // Ask for the dates level of dress.        int input2;        System.out.print("Now, please enter your dates level of dress, with 10 as the highest : ");        if(input1 + input2 >= 8) {             System.out.println("You and your date can be seated right away!");        }        else if(input1 <= 7 && >= 3) && (input2 <=7 & >= 3){            System.out.println("Please wait for a table.");        } Program 2  Calculate a electric bill. Prompt for the meter reading as a integer with the folowing calculations: if the meter reading is less than or equal to 50 units then the rate is $ 0.50 per unit if the meter reading is greater than 50 and less than 100 units,  then the rate is $0.75 per unit if the meter reading is greater or equal to 100, but less than 250, then the rate is $1.20 per unit Anything 250 and above is 1.50 per unit The electric use = meter reading x rate. An additional surcharge of 20% should be added to the bill. Else-if statements should be used to determine the rate. Print the electric use rate, the surcharge, and the total amount due.  Formatting the numbers to currency format is not necessary. Sample Output- Enter the meter reading:125 Electric Use: 150.0 Surcharge is: 30.0 Your energy bill is: $180.0

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question
100%

Hello! I could really use help for these two problems. 

Program 1

Show how well dressed you and your date are.  Your program will prompt for two inputs, the style of you and your date.  Input for each should be a integer on a scale of 1-10, with 10 being the best.  You can be seated immediately if either of you are 'stylin' (8 or higher) .  However, if you or your date have a style of 2 or less, then you won't be seated, even if one of you is a 8 or more. Otherwise, you'll have to wait for a table.

Based on the inputs, the program should indicate if you can be seated right away, if you have to wait, or if there are no tables available.

Sample output shown below:

Rate how dressed up you are, with 10 being the highest ==> 8
How about your date?  Same scale  ==> 9
Your table is ready!

Rate how dressed up you are, with 10 being the highest ==> 9
How about your date?  Same scale  ==> 2
Sorry, No table available

Rate how dressed up you are, with 10 being the highest ==> 5
How about your date?  Same scale  ==> 5
Please wait for a table.

My Code so far for program 1:

import java.util.*;

public class DateNight {
public static void main(String args[]) {
    Scanner Sc = new Scanner(System.in);
       int input1;
// Print a message asking for first persons level of dress.
       System.out.print("Welcome to our restaurant! Please enter your level of dress, with 10 as the highest : ");
// Ask for the dates level of dress.
       int input2;
       System.out.print("Now, please enter your dates level of dress, with 10 as the highest : ");
       if(input1 + input2 >= 8) {
            System.out.println("You and your date can be seated right away!");
       }
       else if(input1 <= 7 && >= 3) && (input2 <=7 & >= 3){
           System.out.println("Please wait for a table.");
       }

Program 2 

Calculate a electric bill. Prompt for the meter reading as a integer with the folowing calculations:

if the meter reading is less than or equal to 50 units then the rate is $ 0.50 per unit
if the meter reading is greater than 50 and less than 100 units,  then the rate is $0.75 per unit
if the meter reading is greater or equal to 100, but less than 250, then the rate is $1.20 per unit
Anything 250 and above is 1.50 per unit
The electric use = meter reading x rate.

An additional surcharge of 20% should be added to the bill.

Else-if statements should be used to determine the rate. Print the electric use rate, the surcharge, and the total amount due.  Formatting the numbers to currency format is not necessary.

Sample Output-

Enter the meter reading:125

Electric Use: 150.0
Surcharge is: 30.0
Your energy bill is: $180.0

 

I would really appriacte any help, with steps on how to solve this if possible. Thanks in advance!

Expert Solution
steps

Step by step

Solved in 7 steps with 2 images

Blurred answer
Knowledge Booster
Operators
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education