GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

18. How does the knight’s wife transform at the end of the t…

18. How does the knight’s wife transform at the end of the tale?

Read Details

Which of the following statements about interfaces is not tr…

Which of the following statements about interfaces is not true?

Read Details

Which of the following is not one of the stages of a query o…

Which of the following is not one of the stages of a query operation?

Read Details

Use the supplied solution, search for TODO then write the co…

Use the supplied solution, search for TODO then write the code and test the application. Remember to Download the XXX and unzip. Open VehicleRepair.sln in Visual Studio 2022. Right-click on the RepairUI project and ensure it is ‘Set as StartUp Project’. Answer as many questions as possible, partial credit will be granted. Run the application to perform testing as needed. When complete use File Explorer, WinZip or 7-Zip to .zip the directory with application files. Upload the .zip file as your answer to the last essay question. You are developing an application that allows users to capture details for vehicle repair program.  The user must select a repair type.  Next click details to enter the repair details, click OK will display repair details and click Close will close form.  Finally click the cost button to display repair cost.  Given the solution, which is a 3-tier application and uses class inheritance with a RepairBO base class, follow comments and write code to meet requirements: The user must select vehicle type for Details button click to open Details screen. When the user clicks Details, open the Details screen as modal. Should be able to change repair details until clicking OK and Close on Details screen. When the user enters details and clicks OK: Validate numeric values and display any errors using a message box. Populate values from screen into the business object. Display values from business object on the Main screen. When the user clicks Cost, use business object to determine and display the repair cost. ‘Affirmation of Authorship: ‘Name: ‘Date: ‘I affirm that this program was created by me. It is solely my work and does not include anyone else work.   public partial class frmMain : Form{    // TODO #1: Public class variable objRepair for RepairBO (1 point)     // TODO #2: Create class variable for Details form (1 point)     public frmMain()    {        InitializeComponent();    }     // Check to determine cost for repairs    private void btnCost_Click(object sender, EventArgs e)    {        try        {            // Define and initialize dblCost variable            double dblCost = 0.00;             // TODO #3: Populate dblCost by calling objRepair Cost() function (1 point)             // Display message based on cost            if (dblCost > 0)            {                // TODO #4: Populate lblResult to indicate repair cost (1 point)             }            else            {                // TODO #5: Populate lblResult to indicate details needed (1 point)             }        }         catch (Exception ex)        {             // TODO #6: Populate lblResult with error message (1 point)          }    }    private void MainForm_Load(object sender, EventArgs e)    {        // TODO #7: Clear lblDetails and lblResults (1 point)         // TODO #8: Add the vehicle types to the combobox using Types() from the RepairBO business object (1 point)      }     private void btnDetails_Click(object sender, EventArgs e)    {        // Edit to ensure a repair type is selected        if (!string.IsNullOrEmpty(cboRepairType.Text))        {             // TODO #9: Clear lblResults (1 point)             // TODO #10: Show the details form as dialog (1 point)           }         else        {             // Display message for user to select a repair type            MessageBox.Show(“Please select a repair type.”);        }     } }   public partial class frmDetails : Form{    private frmMain objFrmMain;     // Dimension private class variable for repair type    private string strRepairType;     // TODO #11: Dimension public class variables for EngineRepairBO (1 point)     // TODO #12: Dimension public class variables for BodyRepairBO (1 point)     public frmDetails(frmMain objFrm)    {        objFrmMain = objFrm;        InitializeComponent();    }     private void btnOK_Click(object sender, EventArgs e)    {         try        {            // TODO #13: Call PopulateValues() method (1 point)             // Based on the specific repair type selected on MainForm,            // Populate MainForm public objRepair from DetailForm either objEngine or objBody            // and MainForm lblDetails from DetailForm objEngine or objBody .ToString()            switch (strRepairType ?? “”)            {                case “Body”:                    {                        // TODO #14: Populate MainForm public objRepair from DetailForm objBody (1 point)                         // TODO #15: Populate MainForm lblDetails from DetailForm objBody .ToString() (1 point)                         break;                    }                case “Engine”:                    {                        // TODO #16: Populate MainForm public objRepair from DetailForm objEngine (1 point)                         // TODO #17: Populate MainForm lblDetails from DetailForm objEngine .ToString() (1 point)                         break;                    }            }        }         catch (RepairException vx)        {             // Display message and exception number if RepairException occurs            MessageBox.Show(vx.Message + ” – Code=” + vx.ExceptionNumber.ToString());        }         catch (Exception ex)        {             // Display message if Exception occurs            MessageBox.Show(“Please check all input fields. ” + ex.Message);         }    }     private void btnCancel_Click(object sender, EventArgs e)    {        // TODO #18: Hide the details form (1 point)     }     private void PopulateValues()    {         // Based on the specific vehicle type selected on MainForm,        // populate properties in BodyRepairBO or EngineRepairBO        switch (strRepairType ?? “”)        {            case “Body”:                {                    // Populate objBody properties from DetailsForm screen values                     // TODO #19: objBody.ID  (1 point)                     // TODO #20: objBody.Make (1 point)                     // TODO #21: objBody.Model (1 point)                     // TODO #22: objBody.Color (1 point)                     // TODO #23: objBody.NumDoors (1 point)                     // TODO #24: objBody.Sunroof (1 point)                     break;                }            case “Engine”:                {                    // Populate objEngine properties from DetailsForm screen values                     // TODO #25: objEngine.ID (1 point)                     // TODO #26: objEngine.Make (1 point)                     // TODO #27: objEngine.Model (1 point)                     // TODO #20: objEngine.Color (1 point)                     // TODO #29: objEngine.NumCylinders (1 point)                     // TODO #30: objEngine.Hybrid (1 point)                     break;                }        }    }     private void frmDetails_Load(object sender, EventArgs e)    {        // Set class variable for strVehicleType from MainForm cboRepairType        strRepairType = objFrmMain.cboRepairType.Text;         // Based on the specific vehicle type selected on MainForm,        // show appropriate groupbox and hide all other grouboxes        switch (strRepairType ?? “”)        {            case “Engine”:                {                    gbEngineRepair.Show();                    gbBodyRepair.Hide();                    break;                }            case “Body”:                {                    gbEngineRepair.Hide();                    gbBodyRepair.Show();                    break;                }        }    }}

Read Details

In the context of the lac operon in E. coli, which of the fo…

In the context of the lac operon in E. coli, which of the following scenarios would result in maximal transcription of the operon?

Read Details

 Which of the following correctly describes the process by w…

 Which of the following correctly describes the process by which dietary fats are digested, absorbed, and utilized in the body?

Read Details

Which of the following statements best describes the formati…

Which of the following statements best describes the formation of pyrimidine dimers by UV light?

Read Details

 Which of the following correctly matches the type of lipopr…

 Which of the following correctly matches the type of lipoprotein with its primary function?

Read Details

Which one of the following enzymes contains a 5’→3′ exonucle…

Which one of the following enzymes contains a 5’→3′ exonuclease activity?

Read Details

Based on the following graph, BPG allosterically binds to bo…

Based on the following graph, BPG allosterically binds to both fetal (HbF) and maternal (HbA) hemoglobin. Which statement is correct?

Read Details

Posts pagination

Newer posts 1 … 33,134 33,135 33,136 33,137 33,138 … 71,118 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top