1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
weqwewe [10]
3 years ago
13

A. Create a console-based application named Desks that computes the price of a desk and whose Main() method calls the following

methods:
• A method to accept the number of drawers in the desk as input from the keyboard. This method returns the number of drawers to the Main() method.
• A method to accept as input and return the type of wood—‘m’ for mahogany, ‘o’ for oak, or ‘p’ for pine.
• A method that accepts the number of drawers and wood type, and calculates the cost of the desk based on the following:
• Pine desks are $100.
• Oak desks are $140.
• All other woods are $180.
• A $30 surcharge is added for each drawer.
• This method returns the cost to the Main() method.
• A method to display all the details and the final price.
b. Create a GUI application named DesksGUI that accepts desk order data from TextBox
Computers and Technology
1 answer:
Maslowich3 years ago
4 0

Answer:

Explanation:

Code:-

using System;

using System.Linq;

using System.Collections;

using System.Collections.Generic;

public class Test{

public static int no_drawer(){

Console.WriteLine("Enter the number of drawers : ");

return Int32.Parse(Console.ReadLine());

}

public static char wood_type(){

Console.WriteLine("Enter the type of woods('m' for mahogany, 'o' for oak, or 'p' for pine) : ");

return Console.ReadLine()[0];

}

public static double final_cost(int d,char ch){

double cost = 0.0;

if (ch == 'p') cost += d*100;

else if (ch == 'o') cost += d*140;

else cost += d*180;

cost += d*30;

return cost;

}

public static void display(int d,char ch,double p){

Console.WriteLine("Number of drawers : "+d);

if (ch == 'p')

Console.WriteLine("Type of Wood Chosen : pine");

else if (ch == '0')

Console.WriteLine("Type of Wood Chosen : oak");

else if (ch == 'm')

Console.WriteLine("Type of Wood Chosen : mahogany");

else

Console.WriteLine("Type of Wood Chosen : other");

Console.WriteLine("Total Cost is : "+p);

}

public static void Main(){

int drawers = no_drawer();

char ch_wood = wood_type();

double res = final_cost(drawers,ch_wood);

display(drawers, ch_wood,res);

}

}

cheers i hope this helped !!!

You might be interested in
Int x = 25;
Olin [163]

Answer:

printer

Explanation:

4 0
3 years ago
What is the optimal number of members for an Agile team?
kotykmax [81]
  • 5 or 6 people

Explanation:

Second, for those of you who demand a prefer an answer upfront, here it is – the optimal number of members for an agile team is 5 or 6 people. That is 5 or 6 team members and excludes roles like Scrum Master, Product Owner, and God forbid, Project Manager.

7 0
2 years ago
A ____ web site is a fraudulent site that has been set up to be indistinguishable from the legitimate site it is pretending to b
Vladimir [108]
Your answer is spoofed.
Thx and take care
7 0
3 years ago
A DDos attack _____________.
melomori [17]

Answer:

Option (1) the is correct answer for the above question.

Explanation:

"DDos" stands for distributed denial-of-service. It is a type of attack which affects the network route. It disturbs the normal route like a traffic Jam. It operators from some hosts point and act after getting access to the system in an unauthorized way.

It attacks to disturb the service provided by the other system. It authorized the hosts' system and entered into the system to get disturb the routine of the system.

  • Option 1 also suggests the same hence it is a correct option.
  • While option 2 suggests that it is a software, but it is a concept that means to disturb the normal routine of the system and he can get that information access which is transmitted over the signals. hence option 2 is not fit for the question.

4 0
3 years ago
The operating system’s application programming interface (API) provides software developers with tools they use to build applica
lubasha [3.4K]

Answer:

True

Explanation:

Application Programming Interface (API) is a set of commands, functions, protocols, and objects that programmers can use to create software or interact with an external system. It provides developers with standard commands for performing common operations so they do not have to write the code from scratch.

Operating system APIs are typically integrated into the software development kit for the corresponding program. For example, Apple's Xcode IDE allows developers to drag and drop elements into an application's interface. It also provides a list of available functions and includes syntax highlighting for known elements and commands.   Operating system APIs have a robust set of features.

3 0
3 years ago
Other questions:
  • The default primary key for an access database is the id field true or falser
    7·1 answer
  • ​What file system below does not support encryption, file based compression, and disk quotas, but does support extremely large v
    10·1 answer
  • Which of the following is a list of input devices?
    13·2 answers
  • Print and digital forms of communication, including television, newspapers, radio, and Internet, intended to convey information
    8·1 answer
  • What type of file is MyFile.dll?
    14·2 answers
  • A ______ object is used for displaying the results of a question based on stored data.
    11·2 answers
  • Why is spyware more dangerous than adware
    5·1 answer
  • A short story, but i remember in 1nd - 5th grade at my elementary school here is the list from first to last for being cool at s
    9·2 answers
  • when you sent email your email can be set to automatically keep a copy where do you find these copies​
    13·1 answer
  • PLEASE ANSWER
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!